[Qgis-developer] Inverted polygon renderer and shapeburst fill in qgis server tiles
Nyall Dawson
nyall.dawson at gmail.com
Tue Sep 29 14:19:58 PDT 2015
On 17 September 2015 at 23:37, Régis Haubourg
<regis.haubourg at eau-adour-garonne.fr> wrote:
> Hi,
> working on qgisserver install here with tiled client (Lizmap), we
> encountered that empty tiles are rendered with borders inheriting from
> shapeburstfill.
> See picture [0]
>
> That is fine in desktop QGIS mapcanvas unless we put an oversized "shade to
> distance" value.
> See [1]
>
> Any idea if there could be a workaround to avoid that with inverted polygon
> renderer tiles? I guess Nyall knows that ;-)
It's not simple ;) but I agree that it's an annoying side effect of
the shapeburst. You'll also notice that with a large enough distance
you'll also see the effects of polygons being clipped just outside of
the canvas
The answer is hiding somewhere in
QgsShapeburstFillSymbolLayerV2::distanceTransform1d:
https://github.com/qgis/QGIS/blob/master/src/core/symbology-ng/qgsfillsymbollayerv2.cpp#L1262
Basically at the moment that algorithm assumes that pixels at the
beginning and end of a row should have an initial distance of 0, when
for our uses they should have an initial distance of infinite.
Unfortunately the highly-optimised maths in that function is a bit
beyond my grasp, so if a shotgun trial-and-error approach fails, I'll
need to wait until someone with more advanced mathematical
understanding comes along to fix this!
Nyall
>
> Cheers
> Régis
>
> [0]
> https://drive.google.com/file/d/0BzatQbprJ-hjM3RnTmFMaEZiWDQ/view?usp=sharing
> [1]
> https://drive.google.com/file/d/0BzatQbprJ-hjbXdESU1xUFJhdVU/view?usp=sharing
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/Inverted-polygon-renderer-and-shapeburst-fill-in-qgis-server-tiles-tp5224645.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the Qgis-developer
mailing list