== Shapefile Layers == Upload a Shapefile to display on the map. Options: * Upload to !GeoServer co-app & add a layer which accesses this via WMS/WFS (although the UI should show in the 'Shapefiles layers' section) * http://docs.geoserver.org/2.0.0/user/extensions/rest/rest-config-examples-curl.html#uploading-a-shapefile * https://github.com/dwins/gsconfig.py * Import Features * Can use the Python bindings for GDAL/OGR as we do for the [wiki:UserGuidelinesGISData#GADM GADM importer] We can include [http://thematicmapping.org/downloads/world_borders.php TM_WORLD_BORDERS-0.3.zip] as a useful base/sample Alternative options: * Integrate [http://featureserver.org FeatureServer] * Integrate [http://ogre.adc4gis.com Ogre] - convert to GeoJSON for easy import * Build a .map file for [http://mapserver.org MapServer] using [http://mapserver.org/mapscript Python MapScript] PaulPorthouse: Our idea is to use a basic web form with a file upload (similar to the Import from OpenStreetMap) where you can select which ShapeFile to use. You should also be able to set basic information including database connection details. This will then upload the shape and use OGR2OGR to convert the ShapeFile to geometry and import it into the specified database. A basic OGR2OGR which should accomplish the import is: OGR2OGR -overwrite -f "PostgreSQL" PG:dbname=databaseconnection shapefile.shp This could be called directly from Python by running it as a sub process. Alternatively, to use Python bindings, you could perform the import using GDAL which would allow more control over the import directly within Python, but should still handle the import into Postgres. ---- [wiki:BluePrint/GIS GIS BluePrints]ic