ArcGIS to PostGIS – How to Export Layers from ArcGIS to PostGIS While Preserving Attributes

arcgis-desktopfields-attributesgeoserverpostgisvector

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.

Best Answer

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
Related Question