[FWTools] ogr2ogr

David Fawcett david.fawcett at gmail.com
Sun Aug 21 02:40:07 EDT 2005


I am using org2ogr on linux (fc3).  I am attempting to reproject a
shapefile that is in lat/long to UTM Zone 15.

Here is my syntax:  [root at localhost data]# ogr2ogr sail_trk.shp -a_srs
EPSG:26915

I get this response indicating that my syntax is either wrong or that
it doesn't recognize my epsg code:

Usage: ogr2ogr [-skipfailures] [-append] [-update] [-f format_name]
               [-select field_list] [-where restricted_where]
               [-sql <sql statement>]
               [-spat xmin ymin xmax ymax] [-preserve_fid] [-fid FID]
               [-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def]
               [[-dsco NAME=VALUE] ...] dst_datasource_name
               src_datasource_name
               [-lco NAME=VALUE] [-nln name] [-nlt type] layer [layer ...]]

 -f format_name: output file format name, possible values are:
     -f "ESRI Shapefile"
     -f "TIGER"
     -f "S57"
     -f "MapInfo File"
     -f "DGN"
     -f "Memory"
     -f "CSV"
     -f "GML"
     -f "Interlis 1"
     -f "Interlis 2"
     -f "SQLite"
     -f "PostgreSQL"
 -append: Append to existing layer instead of creating new
 -update: Open existing output datasource in update mode
 -select field_list: Comma-delimited list of fields from input layer to
                     copy to the new layer (defaults to all)
 -where restricted_where: Attribute query (like SQL WHERE)
 -sql statement: Execute given SQL statement and save result.
 -skipfailures: skip features or layers that fail to convert
 -spat xmin ymin xmax ymax: spatial query extents
 -dsco NAME=VALUE: Dataset creation option (format specific)
 -lco  NAME=VALUE: Layer creation option (format specific)
 -nln name: Assign an alternate name to the new layer
 -nlt type: Force a geometry type for new layer.  One of NONE, GEOMETRY,
      POINT, LINESTRING, POLYGON, GEOMETRYCOLLECTION, MULTIPOINT, MULTILINE,
      MULTIPOLYGON, or MULTILINESTRING.  Add "25D" for 3D layers.
      Default is type of source layer.
 -a_srs srs_def: Assign an output SRS
 -t_srs srs_def: Reproject/transform to this SRS on output
 -s_srs srs_def: Override source SRS

 Srs_def can be a full WKT definition (hard to escape properly),
 or a well known definition (ie. EPSG:4326) or a file with a WKT
 definition.

Any ideas on what I am doing wrong?  

David.



More information about the FWTools mailing list