Hi all
I have been looking into the SLDStyleFactory again after we noticed some
pixelation in GeoServer legend graphics when using an SVG image as point
symbolizer. You can see an example in the attached files with the style
as SLD + the external graphic as SVG and the resulting legend graphic in
legend_0.png (with the following query parameters:
&width=20&height=20&LEGEND_OPTIONS=dpi:364;fontAntiAliasing:true;forceLabels:on).
Increasing the parameters WIDTH and HEIGHT does not help, as it only
adds padding around the symbol. But we get much better result when using
RenderingHints.VALUE_ANTIALIAS_ON here:
https://github.com/geotools/geotools/blob/80a01af1b6ea405fca6b03fe780b73c0d431890c/modules/library/render/src/main/java/org/geotools/renderer/style/SLDStyleFactory.java#L165
-> see in the file legend_1.png
Is there a reason not to use antialiasing here (I know it also impacts
the map rendering) or is there some other way to avoid pixelation?
Thanks in advance and best regards,
Cécile
--
*camptocamp*
*Cécile Vuilleumier
*
Geospatial developer
www.camptocamp.com <http://www.camptocamp.com>
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>arrow</Name>
<UserStyle>
<Name>arrow</Name>
<Title>Arrow</Title>
<FeatureTypeStyle>
<Rule>
<Title>Down</Title>
<PointSymbolizer>
<Graphic>
<ExternalGraphic xmlns="http://www.opengis.net/sld" xmlns:xlink="http://www.w3.org/1999/xlink">
<OnlineResource xlink:type="simple" xlink:href="arrow.svg" />
<Format>image/svg+xml</Format>
</ExternalGraphic>
<Size>17</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel