Changes between Version 21 and Version 22 of Cookbook gdal
- Timestamp:
- Jan 29, 2010 12:03:47 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TabularUnified Cookbook gdal
v21 v22 26 26 C:\OSGeo4W\bin\ogr2ogr -f "ESRI Shapefile" C:\base\basesig\Czhyd.shp C:\base\basesig\Czhyd.mdb 27 27 }}} 28 Cedric : this one works but warning there should be no space in the path (ex : no "document and settings/"...) 28 '' Cedric : this one works but warning there should be no space in the path (ex : no "document and settings/"...) '' 29 29 === Conversion from PostGIS to ESRI Shape === 30 adapted from url:[http://www.bostongis.com/?content_name=ogr_cheatsheet] 30 '' adapted from url: ''[http://www.bostongis.com/?content_name=ogr_cheatsheet] 31 31 The '''pgsql2shp''' and '''shp2pgsql''' are usually the best tools for converting back and forth between PostGIS and ESRI for 2 main reasons. 32 32 33 33 * ''It has fewer idiosyncracies when converting data.'' 34 34 * ''It has a lot fewer dependencies so can fit on your floppy.'' 35 36 35 If you really want to use Ogr2Ogr for this kind of conversion, below is the standard way to do it 37 Here the example should export the table riversegments 36 Here the example should export the table riversegments[[BR]] 38 37 Cedric 39 38 {{{ … … 62 61 C:\OSGeo4W\bin\ogr2ogr -f "ESRI Shapefile" essai2 PG:"host=locahost user=postgres dbname=CCM password=postgres port=5433" 63 62 }}} 64 65 66 63 Now most of the time you probably only want to output a subset of your postgis tables rather than all your tables. This code exports only the riversegments and rivernodes tables to a folder called c:/base/basesig/mydatadump in ESRI shapefile format 67 64 {{{