Changes between Version 17 and Version 18 of BluePrint/GIS/ShapefileLayers


Ignore:
Timestamp:
04/27/13 11:42:49 (12 years ago)
Author:
PaulPorthouse
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/GIS/ShapefileLayers

    v17 v18  
    1717 * Build a .map file for [http://mapserver.org MapServer] using [http://mapserver.org/mapscript Python MapScript]
    1818
     19PaulPorthouse:
     20
     21Our 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.
     22
     23A basic OGR2OGR which should accomplish the import is:
     24OGR2OGR -overwrite -f "PostgreSQL" PG:dbname=databaseconnection shapefile.shp
     25
     26This could be called directly from Python by running it as a sub process.
     27
     28Alternatively, 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.
     29
    1930----
    20 [wiki:BluePrint/GIS GIS BluePrints]
     31[wiki:BluePrint/GIS GIS BluePrints]ic