I have managed to import/convert a KML into ArcGIS 10.0 (ArcMap) using the built-in conversion tools and now have a series of layers. Next, I export these layers to a PostGIS database using the following command:

ogr2ogr -f "PostgreSQL" PG:'host=localhost port=12345 dbname=mydb user=removed password=removed' Roads.gdb -progress --config PG_USE_COPY YES

Note that when doing so, four separate layers are stored as a single layer in PostGIS - I'm unsure whether or not that is relevant. Anyhow, next, I use GeoServer with the PostGIS database as a store to serve the layer using WMS, and have a Leaflet client display the tiles overlaid on various other tiles.

Somewhere in this process all color attributes from the data are apparently removed (The data are a set of lines over roads, colored based upon speed limit - each color is a separate ArcGIS layer).

How can I preserve the attributes of my data? I have access to ArcGIS Desktop, PostGIS, OGR/GDAL, and GeoServer.

  • 3
    PostGIS is just a geo-spatial component of PostgreSQL database. Databases typically do not store layer styles. Styling is usually performed on the client side (e.g. ArcMap, QGIS, Leaflet, OpenLayers...etc), or styled via a GIS server (e.g. ArcGIS server or GeoServer) as a WMS.
    – artwork21
    Apr 8, 2015 at 1:50
  • I'm sorry, I must be tired as I left that out - I am using GeoServer's WMS service [original question heavily edited]. How might I convey the layer styles to GeoServer?
    – bfishman
    Apr 8, 2015 at 2:44

2 Answers 2


Unfortunately, I have not found a method for creating SLD files in ArcMap for GeoServer use. There are some alternative app. options:

  • Udig
  • QGIS
  • GeoExplorer
  • GeoServer admin SLD editor
  • Thanks. I'll post a new question regarding the best way to go from KML -> PostGIS / GeoServer while preserving styles.
    – bfishman
    Apr 8, 2015 at 15:24

The following program ArcMap2SLDConverter will generate an SLD file from an ArcGIS Map - but you must have ArcGIS installed and running to do so.

This SLD can then be uploaded to GeoServer, and used to style the corresponding layer.

Your Answer

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

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