[QGIS-Developer] QGIS Upgrade/Update Inquiry

2022-10-04 Thread John Bingco via QGIS-Developer
Hi Team,

I work for an IT service provider in Australia and we are working with a client 
that uses QGIS.

The client is requesting for their QGIS to be updated/upgraded to the latest 
version. Just wanted to check if there is anything we need to take note when 
doing the update/upgrade. User is worried about compatibility issues.

If there is none, are we good to just directly install the latest version on 
server for all users to have updated version of the software?

Appreciate your response on this. 😊

Regards,
John

--
John Bingco TECHNICIAN
ELEVATE TECHNOLOGY
Mackay, Brisbane, & Newcastle
P: 1300 463 538
W: www.elevate.com.au
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] QGIS Server WMS Advertised extent and layers / groups bounding box in GetCapabilities

2022-10-04 Thread David Marteau via QGIS-Developer

Hi,

Does that mean that is not playing any authoritative rôle  ?

David

Le 04/10/2022 à 13:43, Jürgen E. Fischer via QGIS-Developer a écrit :

Hi René-Luc,

On Tue, 04. Oct 2022 at 13:37:54 +0200, René-Luc Dhont via QGIS-Developer wrote:

So I wonder what the role of the WMS Advertised extent is.
* Is it only the root layer / group extent ?
* Is it a restricted extent (no data available outside this extent) ?
* Is it the minimum extent of all WMS layers ?

   * an (suggested) area of interest for clients.


Jürgen


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] QgsProcessingLayerPostProcessorInterface and Layers Legend Icon

2022-10-04 Thread C Hamilton via QGIS-Developer
I have several plugin functions that are
using QgsProcessingLayerPostProcessorInterface to style the layer after it
is created in a processing algorithm. I have largely ignored the fact that
after I style it, the legend displayed in the layers panel is its old style
and not the new one. I have a solution, but don't know if I am violating
some thread safe rule. I know I cannot use iface in the algorithm, but is
it safe to use in QgsProcessingLayerPostProcessorInterface?

In the top of my algorithm I import the following:

from qgis.utils import iface

In the processAlgorithm function I have the following.

if context.willLoadLayerOnCompletion(dest_id):

context.layerToLoadOnCompletionDetails(dest_id).setPostProcessor(StylePostProcessor.create(settings.lineColor,
settings.fontColor))
return {self.PrmOutput: dest_id}

My QgsProcessingLayerPostProcessorInterface looks like this. Notice the
line iface.layerTreeView().refreshLayerSymbology(layer.id()) which
effectively does what I need it to do. It works, but is safe or is there a
better way to do this? The output layer is a polygon in which I only want
the outline displayed. I am passing some color parameters from
processAlgorithm.

class StylePostProcessor(QgsProcessingLayerPostProcessorInterface):
instance = None
line_color = None
font_color = None

def __init__(self, line_color, font_color):
self.line_color = line_color
self.font_color = font_color
super().__init__()

def postProcessLayer(self, layer, context, feedback):

if not isinstance(layer, QgsVectorLayer):
return
sym = layer.renderer().symbol().symbolLayer(0)
sym.setBrushStyle(Qt.NoBrush)
sym.setStrokeColor(self.line_color)
   * iface.layerTreeView().refreshLayerSymbology(layer.id
())*

# Hack to work around sip bug!
@staticmethod
def create(line_color, font_color) -> 'StylePostProcessor':
"""
Returns a new instance of the post processor, keeping a reference
to the sip
wrapper so that sip doesn't get confused with the Python subclass
and call
the base wrapper implementation instead... ahhh sip, you wonderful
piece of sip
"""
StylePostProcessor.instance = StylePostProcessor(line_color,
font_color)
return StylePostProcessor.instance
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] QGIS Server WMS Advertised extent and layers / groups bounding box in GetCapabilities

2022-10-04 Thread Jürgen E . Fischer via QGIS-Developer
Hi René-Luc,

On Tue, 04. Oct 2022 at 13:37:54 +0200, René-Luc Dhont via QGIS-Developer wrote:
> So I wonder what the role of the WMS Advertised extent is.
> * Is it only the root layer / group extent ?
> * Is it a restricted extent (no data available outside this extent) ?
> * Is it the minimum extent of all WMS layers ?
  * an (suggested) area of interest for clients.


Jürgen

-- 
Jürgen E. Fischer   norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13  Fax. +49-4931-918175-50
Software Engineer   D-26506 Nordenhttps://www.norbit.de
QGIS release manager (PSC)  Germany IRC: jef on Libera|OFTC


signature.asc
Description: PGP signature
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] QGIS Server WMS Advertised extent and layers / groups bounding box in GetCapabilities

2022-10-04 Thread René-Luc Dhont via QGIS-Developer

Hi QGIS Server devs,

We, David and I, are working on enhancing the way QGIS Server is 
building the WMS GetCapabilities document. [1]


And I have some questions about the QGIS Server WMS Advertised extent 
and the layers / groups bounding box in GetCapabilities.


For exemple in the tests/testdata/qgis_server/test_project.qgs [2], the 
WMS Advertised extent is set to
* CRS="EPSG:4326" minx="44.901236" miny="8.203154"  maxx="44.901599" 
maxy="8.204165" [3][4]


And in this project, the WGS84 extent of the landsat layer is
* CRS="EPSG:4326" minx="30.151856" miny="17.924273" maxx="30.257289" 
maxy="18.045658" [5]


As you can read, the layer landsat is out of the WMS Advertised extent.

So the WMS GetCapabilities document contains a layer landsat with a 
bounding box outside the root layer / group bounding box.


I was thinking that the root layer / group bounding box should include 
all the layers bounding box.


So I wonder what the role of the WMS Advertised extent is.
* Is it only the root layer / group extent ?
* Is it a restricted extent (no data available outside this extent) ?
* Is it the minimum extent of all WMS layers ?

1. https://github.com/dmarteau/QGIS/tree/wms-getcapabilities-refactoring-2
2. 
https://github.com/qgis/QGIS/blob/master/tests/testdata/qgis_server/test_project.qgs
3. 
https://github.com/qgis/QGIS/blob/master/tests/testdata/qgis_server/test_project.qgs#L1818 

4. 
https://github.com/qgis/QGIS/blob/master/tests/testdata/qgis_server/wms_getcapabilities_rewriting.txt#L114
5. 
https://github.com/qgis/QGIS/blob/master/tests/testdata/qgis_server/wms_getcapabilities_rewriting.txt#L160


Thanks
René-Luc Dhont___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] import 3d or _3d in python?

2022-10-04 Thread Raymond Nijssen via QGIS-Developer

Done:
https://github.com/qgis/pyqgis/issues/97

Raymond



On 03-10-2022 10:24, Martin Dobias wrote:

Hi Raymond

The general idea is that for every PyQGIS module (e.g. "core") there is 
a compiled python module (e.g. _core.so) and a directory acting as a 
module ("core") which imports the compiled module and adds some extra 
functionality (docstrings and more). So normally one wants to use import 
qgis.core instead of qgis._core.


Now with the 3d module things are not so great, because "3d" is not a 
valid module name because of the leading digit, so import qgis.3d simply 
won't work. There are some ways to work it around [1], but I wouldn't 
recommend using them. But as stated earlier, importing qgis._3d should 
generally do the job.


It is probably worth creating a ticket to address this, but I am not 
sure how to best fix it - probably the whole module should be renamed so 
avoid the leading digit - e.g. "threed"


[1] 
https://stackoverflow.com/questions/9090079/in-python-how-to-import-filename-starts-with-a-number 



Cheers
Martin


On Mon, Oct 3, 2022 at 8:58 AM Raymond Nijssen via QGIS-Developer 
mailto:qgis-developer@lists.osgeo.org>> 
wrote:



While trying to import a 3D class in a python script, I found out that
the code in the pyqgis docs is not working (for me):

from qgis.3d import QgsLayoutItem3DMap


Instead I need to add an underscore for the 3d module name:

from qgis._3d import QgsLayoutItem3DMap



Should this be fixed in the documentation? I'm not all sure, cause when
trying to fix it, I found this related commit:


https://github.com/qgis/pyqgis/commit/1ac564790aa0b7abbd003c04d07358d8e4f14493





This is the page in the docs:
https://qgis.org/pyqgis/master/3d/QgsLayoutItem3DMap.html



Should I make an issue? It took me a while to figure out that _3d
solution.

Cheers,
Raymond
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org 
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer