Changes between Version 10 and Version 11 of Cookbook gdal


Ignore:
Timestamp:
Jan 29, 2010 11:20:00 AM (15 years ago)
Author:
cedric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Cookbook gdal

    v10 v11  
    3030If you really want to use Ogr2Ogr for this kind of conversion, below is the standard way to do it 
    3131Here the example should export the table riversegments 
     32Cedric 
    3233{{{ 
    3334C:\OSGeo4W\bin\ogr2ogr -f "ESRI Shapefile" C:\base\basesig\essai.shp PG:"host=localhost user=postgres dbname=CCM password=postgres port=5433" "riversegments" 
     35}}} 
     36Celine (pwd to be precised) 
     37{{{ 
     38C:\OSGeo4W\bin\ogr2ogr -f "ESRI Shapefile" C:\base\basesig\essai.shp PG:"host=localhost user=postgres dbname=CCM password=PWD" "riversegments" 
    3439}}} 
    3540'' Cedric : celui ci marche mais j'ai eu du mal '' 
     
    3742Sometimes you have more than one geometry field in a table, and ESRI shape can only support one geometry field per shape. Also you may only want a subset of data. In these cases, you will need to select the geometry field to use. The most flexible way to do this is to use the -sql command which will take any sql statement. 
    3843{{{ 
    39 ogr2ogr -f "ESRI Shapefile" essai1.shp PG:"host=locahost user=postgres dbname=CCM password=postgres" -sql "SELECT gid, the_geom FROM riversegments" 
     44C:\OSGeo4W\bin\ogr2ogr -f "ESRI Shapefile" essai1.shp PG:"host=locahost user=postgres dbname=CCM password=postgres port=5433" -sql "SELECT gid, the_geom FROM riversegments" 
    4045}}} 
    4146Example snippet converting from PostGIS to KML