[QGIS-Developer] QGIS server issue: bounding box issues

Andreas Neumann a.neumann at carto.net
Thu May 9 02:59:56 PDT 2019


Hi René-Luc,

Thanks for the explanation. Any chance we can "influence" that extent 
calculation (e.g. adding a user-defined margin to that extent?) - I 
guess a fully manual override would not be satisfactory as data changes, 
but adding a user-defined margin to that extent might help for both 
issues we have.

Also, this fact that layer extents are stored in QGIS worries me quite a 
bit. We live in a GDI where any minute data can be changed by any client 
(QGIS, ArcGIS, Geomedia, you name it). What if Geomedia adds features 
outside of the layer extent that is stored in the QGIS project, would 
that data then be ignored by QGIS server, because it is outside of the 
extent stored in the project file in QGIS?

Anyway - I would rather have global bounding boxes for all layers 
(defined globally per project) than some calculated exents stored in a 
QGIS project file that might be outdated quite easily, because other GIS 
edit the data meanwhile. I am not worried about bounding boxes being too 
big, but worried about bounding boxes that hide away existing data.

Andreas

Am 09.05.19 um 11:51 schrieb René-Luc Dhont:
> Hi Andreas,
>
> The layer extent is not calculated by QGIS Server. It is read from the 
> project, and the extent in the project is provided by QGIS when saving 
> it.
>
> In QGIS Server, the layer extent is used to restrict the rendering to 
> the WMS layer extent.
>
> Regards,
> René-Luc
>
> Le 09/05/2019 à 11:28, Andreas Neumann a écrit :
>> Hi QGIS (server) devs,
>>
>> We came across issues around calculating bounding boxes in QGIS server.
>>
>> 1. Layers with only one point feature:
>>
>> If a layer contains only one single point feature, QGIS server 
>> calculates a bounding box where the minx equals maxx and miny equals 
>> maxy, so resulting in a bounding box without a width and height. 
>> Sounds logical to QGIS server developers, but combined with the fact 
>> that QGIS server doesn't take into account rendered symbol sizes 
>> (another issue we have, see issue nr 2), it means that no WMS client 
>> will ever see this one single symbol rendered, which can't be the 
>> solution here ...
>>
>> 2. Layer bounding boxes do not take into account rendered symbol sizes:
>>
>> Please have a look at 
>> http://www.carto.net/neumann/temp/qgis_server_bounding_box_issue.png 
>> - The green rectangle and the green arrows are not part of the QGIS 
>> server rendering, but they are added as an annotation to the rendered 
>> QGIS server graphics, to highlight the issues.
>>
>> Here we have the issue that QGIS server only uses the "raw" geometry 
>> of point symbols without taking into account rendered symbol sizes. 
>> Now, I do understand that calculating symbol sizes is scale dependent 
>> and there is no single solution to that, but again, I think the 
>> current behavior of QGIS server (simply cutting off symbols at layer 
>> bounding boxes) is not a good and nice behavior. At least, I think 
>> the author of the WMS service should have a chance to define an extra 
>> margin to be added to the bounding boxes of the raw geometries of the 
>> point layer, either as a "per project" or "per layer" QGIS server 
>> configuration.
>>
>> @Andrea: I wonder what Geoserver does in such cases?
>>
>> Any thoughts how to solve these issues? The current behavior of QGIS 
>> server is not satisfactory to me, for both cases.
>>
>> Thanks for your replies,
>>
>> Andreas
>>
>> _______________________________________________
>> QGIS-Developer mailing list
>> QGIS-Developer at 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 at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the QGIS-Developer mailing list