Hi,
In QGIS server (various recent versions tested), I am struggling to get
a proper single PNG image of a single category of a categorized renderer


Here is my request:
http://localhost:8083/ogc/oereb-wms-gpkg?SERVICE=WMS&REQUEST=GetLegendGraphic&LAYERS=ch.so.arp.nutzungsplanung.grundnutzung&FORMAT=image/png&SYMBOLWIDTH=20&SYMBOLHEIGHT=10&WIDTH=76&HEIGHT=38&LAYERTITLE=FALSE&RULELABEL=FALSE&DPI=96&LAYERTITLE=FALSE&RULELABEL=FALSE&BOXSPACE=0&ICONLABELSPACE=0&LAYERTITLESPACE=0&SYMBOLSPACE=0&LAYERSPACE=0&SLD_BODY=%3CStyledLayerDescriptor%20xmlns%3D%22http%3A//www.opengis.net/sld%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20xmlns%3Axsi%3D%22http%3A//www.w3.org/2001/XMLSchema-instance%22%20xsi%3AschemaLocation%3D%22http%3A//www.opengis.net/sld%20http%3A//schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd%22%20xmlns%3Ase%3D%22http%3A//www.opengis.net/se%22%20version%3D%221.1.0%22%20xmlns%3Aogc%3D%22http%3A//www.opengis.net/ogc%22%3E%0A%20%20%20%20%3CNamedLayer%3E%0A%20%20%20%20%20%20%20%20%3Cse%3AName%3Ech.so.arp.nutzungsplanung.grundnutzung%3C/se%3AName%3E%0A%20%20%20%20%20%20%20%20%3CUserStyle%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20
%3Cse%3AName%3Edefault%3C/se%3AName%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AFeatureTypeStyle%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3ARule%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AName%3EWohnzone%201%20G%3C/se%3AName%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3ADescription%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3ATitle%3EWohnzone%201%20G%3C/se%3ATitle%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C/se%3ADescription%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cogc%3AFilter%20xmlns%3Aogc%3D%22http%3A//www.opengis.net/ogc%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cogc%3APropertyIsEqualTo%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cogc%3APropertyName%3Eartcode%3C/ogc%3APropertyName%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%2
0%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cogc%3ALiteral%3E110%3C/ogc%3ALiteral%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C/ogc%3APropertyIsEqualTo%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C/ogc%3AFilter%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3APolygonSymbolizer%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3AFill%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cse%3ASvgParameter%20name%3D%22fill%22%3E%23ffff33%3C/se%3ASvgParameter%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C/se%3AFill%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C/se%3APolygonSymbolizer%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C/se%3ARule%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C/se%3AFeatureTypeStyle%3E%0A%20%20%20%20%20%20%20%20%3C/UserStyle%3E%0A%20%20%20%20%3C/Nam
edLayer%3E%0A%3C/StyledLayerDescriptor%3E


and here is the resulting image: Note the white borders on the top and on the right of the image.
The other interesting thing: despite the fact that I asked for an image
with 76x38 px in size, I get an image with 79x51 in size. If I cut out
the "yellow" part I roughly end up at 75x38 px.
Any idea what parameter could help to get rid of the white margins on
top and right? Thank you very much for your help! Andreas
PS: here is a docker configuration to test with:
https://github.com/sogis/oereb-wms
_______________________________________________
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

Reply via email to