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
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer