Using the default geoserver DATA folder, and putting a square around a label of a point it throws an error on scale 1:8k.
It only happens at 1:8k with this font-size (2). If we change the font-size it happens at another scale.
How to replicate:
On point.sld add the following rule:
<Rule>
<TextSymbolizer uom="http://www.opengeospatial.org/se/units/metre">
<Label>
<ogc:PropertyName>NAME</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-size">
<ogc:Literal>2</ogc:Literal>
</CssParameter>
</Font>
<Graphic>
<Mark>
<WellKnownName>square</WellKnownName>
<Stroke>
<CssParameter name="stroke">#ff0000</CssParameter>
<CssParameter name="stroke-width">0.5</CssParameter>
</Stroke>
</Mark>
</Graphic>
<VendorOption name="spaceAround">-1</VendorOption>
<VendorOption name="graphic-resize">stretch</VendorOption>
<VendorOption name="graphic-margin">1</VendorOption>
</TextSymbolizer>
</Rule>
Open the Layer Preview of Geoserver web to test or put the URL in the browser:
http://localhost/geoserver/tiger/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=tiger%3Apoi&exceptions=application%2Fvnd.ogc.se_inimage&STYLES=point&SRS=EPSG%3A4326&WIDTH=1001&HEIGHT=501&BBOX=-74.01942026886464%2C40.70413100448132%2C-73.9979623529005%2C40.71486008438587
Got the error:
Caused by: java.lang.NullPointerException
at org.geotools.renderer.label.LabelPainter.paintStraightLabel(LabelPainter.java:371)
at org.geotools.renderer.label.LabelCacheImpl.paintPointLabelInternal(LabelCacheImpl.java:1457)
at org.geotools.renderer.label.LabelCacheImpl.paintPointLabel(LabelCacheImpl.java:1299)
at org.geotools.renderer.label.LabelCacheImpl.paintLabel(LabelCacheImpl.java:556)
at org.geotools.renderer.label.LabelCacheImpl.paintLabels(LabelCacheImpl.java:517)
at org.geotools.renderer.label.LabelCacheImpl.end(LabelCacheImpl.java:465)
at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:940)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:594)
... 129 more
|