Hi,

Anyone have an alternative to fix this?


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>
                
                        <CssParameter name="font-size">
                                <ogc:Literal>2</ogc:Literal>
                        </CssParameter>
                
                <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


Thank you,
Tiago Vieira



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to