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.
Answer
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.
No comments:
Post a Comment