Raster data is currently not included in WMS GetMap responses formatted as SVG.
In GeoServer 2.5.x, it was simply a matter of adding "batik-codec.jar" to the classpath. And then data from raster layers was automatically included in the SVG output (as Base64-encoded PNG, thanks to Batik’s ImageHandlerBase64Encoder).
However, with GeoServer 2.6.x, the presence of "batik-codec.jar" in the classpath makes SVG-formatted GetMap requests fail if they include any raster layer.
Here’s the stack trace that I get:
java.lang.IllegalArgumentException: null incompatible with Global antialiasing enable key
at java.awt.RenderingHints.put(RenderingHints.java:1075)
at org.apache.batik.ext.awt.g2d.GraphicContext.setRenderingHint(GraphicContext.java:438)
at org.apache.batik.ext.awt.g2d.AbstractGraphics2D.setRenderingHint(AbstractGraphics2D.java:1071)
at org.geotools.renderer.label.LabelCacheImpl.end(LabelCacheImpl.java:417)
at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:846)
at org.geoserver.wms.svg.SVGBatikMapOutputFormat.createSVGMap(SVGBatikMapOutputFormat.java:167)
at org.geoserver.wms.svg.SVGBatikMapOutputFormat.produceMap(SVGBatikMapOutputFormat.java:86)
at org.geoserver.wms.svg.SVGBatikMapOutputFormat.produceMap(SVGBatikMapOutputFormat.java:42)
at org.geoserver.wms.GetMap.executeInternal(GetMap.java:510)
at org.geoserver.wms.GetMap.run(GetMap.java:254)
at org.geoserver.wms.GetMap.run(GetMap.java:125)
at org.geoserver.wms.DefaultWebMapService.getMap(DefaultWebMapService.java:354)
|