I'm trying to use GeoServer to render a point layer with custom symbols. This worked perfectly well when my symbols were PNGs, but we haven't decided exactly what size our symbols should be, so I tried to switch to SVGs instead, to take advantage of their cleaner resizing.

Now GeoServer won't render anything at all. The relevant bits from the log seem to be:

2013-03-18 23:00:51,655 INFO [geoserver.wms] - 
Request: getServiceInfo
2013-03-18 23:00:51,814 WARN [geotools.rendering] - Assuming rendering buffer = 0, but estimation is not accurate, you may want to set a buffer manually
2013-03-18 23:00:51,822 ERROR [lite.StyledShapePainter] - ShapePainter has been asked to paint a null style!!
2013-03-18 23:00:51,826 ERROR [lite.StyledShapePainter] - ShapePainter has been asked to paint a null style!!
2013-03-18 23:00:51,830 ERROR [lite.StyledShapePainter] - ShapePainter has been asked to paint a null style!!
2013-03-18 23:00:51,835 ERROR [lite.StyledShapePainter] - ShapePainter has been asked to paint a null style!!

And so on (I believe once for each feature, but I haven't counted). My SLD is as follows, but it's a near-perfect match for some of the official examples, so I doubt the problem lies there:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" 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"
  xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
          <Title>Red Square</Title>
                <OnlineResource xlink:type="simple" xlink:href="http://www.shastacsd.org/mapport/img/map-symbols/hydrant.svg" />

Can anyone think what I'm doing wrong? Thanks in advance if you can!

1 Answer 1


Finally figured out what was going wrong when I fired up Inkscape to take a look at the details of the SVG files. They weren't vector graphics; they were raster images embedded in the SVG format. Fortunately, they were pretty simple, and I solved the problem by making my own - real SVGs this time. So moral of the story:

GeoServer doesn't like to render images embedded in SVGs. Use real vector graphics!

Hope this helps someone else someday...

  • 1
    Have the same problem.. Thank god I saw this soon. @Xavier: Any quick ways of making 'real svgs' from the png assets I have currently other than this?
    – Siva
    Commented Apr 30, 2013 at 11:27
  • I found instructions here. But still I am not able to see the symbols. Any idea what might be going wrong?
    – Siva
    Commented Apr 30, 2013 at 11:54
  • @Siva - I'm not sure; my symbols were so simple that I decided to just make a new set in Inkscape rather than try to trace the old ones... Do you have a link to one of your new versions? Commented Apr 30, 2013 at 13:58
  • Here you go: imgh.us/treatment_unit.svg
    – Siva
    Commented May 2, 2013 at 12:53
  • Hi @Siva - Sorry for the late reply; I'm not around here all that often any more. Anyway, it looks like that SVG file still has the raster image embedded in it, and that's what seems to break GeoServer's renderer. You can actually open up SVGs in a text editor, and that's the simplest way to strip those pixels out (lines 62-127). I'd imagine that once you've done that, it'll render just fine - though without the raster background, the image isn't as recognizable as you might hope... You might want to retrace. Good luck! Commented May 5, 2013 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.