On Thu, 9 May 2019 11:28:00 +0200 Andreas Neumann <[email protected]> wrote:
> Hi QGIS (server) devs, Hi Andreas > > 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, Yes. The BBOX of a point has minx=maxx and miny=maxy. Even PostGIS says so :) > 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 ... If the GetMap request's BBOX param is set to the layer extent (the BBOX with no dimension here) then it makes sense that there's nothing rendered in the resulting image. If the GetMap request's BBOX param is set to a BBOX that contains the layer extent then the point should be rendered in the resulting image. So to me this is a client issue, not a QGIS Server issue. > 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. What software do you use on the client side? Does the green rectangle correspond to the BBOX requested by the client? And does the requested BBOX equal the layer extent in this case? Or does it contain the layer extent? I may be wrong but I understand that the requested BBOX (the green rectangle) is the layer extent. And in that case it makes sense that the symbols are cut for points that are closed to the boundaries. Again it's a client issue. > 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. I'd like to better understand the issues that you're seeing but from what I currently understand the behavior of QGIS Server is correct. Happy to be proven otherwise :) Cheers, -- Éric Lemoine Oslandia
pgpYckP65NICZ.pgp
Description: OpenPGP digital signature
_______________________________________________ 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
