3

I used train svg for a point layer (C:\OSGeo4W64\apps\qgis\svg\transport\transport_train_station2.svg) and have used the GeoServer Explorer Plugin to publish the layer on geoserver. But I run into this issue

> Error uploading SVG icon to GeoServer: 404 Client Error: Not Found 
> Traceback (most recent call last):   File
> "xxx/.qgis2/python/plugins\geoserverexplorer\gui\explorer.py", line
> 98, in run
>     command(*params)   File "xxx/.qgis2/python/plugins\geoserverexplorer\qgis\catalog.py", line
> 141, in publishStyle
>     self.uploadIcons(icons)   File "xxx/.qgis2/python/plugins\geoserverexplorer\qgis\catalog.py", line
> 157, in uploadIcons
>     raise Exception ("Error uploading SVG icon to GeoServer:\n" + str(e)) Exception: Error uploading SVG icon to GeoServer: 404 Client
> Error: Not Found

I copied SVG file directly to data_dir\styles of geoserver and tried to upload SLD directly (created following burg example) from geoserver interface - still this image is not getting uploaded.

1

1 Answer 1

2

I've found that using QGIS to generate SLD files gets you about 60-70% there, generally. And uploading layers to GeoServer using QGIS is not done a lot, so it's a little untested.

I reckon you should export your current style as an SLD file, then set up a really simple point style in QGIS and upload your layer to GeoServer. Once your layer is definitely working with that boring style, create a new style on GeoServer using your exported SLD. Once you've done that, follow the GeoServer documentation on marker styles (which is pretty good!).

Something to think on is that if you're using a web-mapping client, you might like to use a vector layer, and have the marker rendered client-side. What I mean is that you could load have point dataset on GeoServer and load it in Leaflet using GeoJSON from WFS, and that could be styled with the SVG icons. Then you've got vectors all the way!

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.