[GRASS-user] ogr2ogr help
Brent Wood
b.wood at niwa.co.nz
Sun Jan 25 19:59:54 EST 2009
Hi,
The help can be arcane, but it is there. Given the wide array of formats, each with its own idiosyncrasies, I don't ever see using ogr2ogr being simple & straightforward.
However, for your problem:
ogr2ogr --help
Usage: ogr2ogr [--help-general] [-skipfailures] [-append] [-update] [-gt n]
[-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]
[-f format_name] [-overwrite] [[-dsco NAME=VALUE] ...]
dst_datasource_name src_datasource_name
[-lco NAME=VALUE] [-nln name] [-nlt type] [layer [layer ...]]
It says the destination name is given before the source name, whereas your command has these reversed.
So instead of
ogr2ogr -f "ESRI Shapefile" -t_srs EPSG:32610 myfile.shp mynewfile.shp
try
ogr2ogr -f "ESRI Shapefile" -t_srs EPSG:32610 mynewfile.shp myfile.shp
HTH,
Brent Wood
Brent Wood
DBA/GIS consultant
NIWA, Wellington
New Zealand
>>> <mtnbiketrail at zzz.com> 01/26/09 1:39 PM >>>
Hi,
beginner user. First off, am disappointed with help files for syntax for
ogr2ogr.
I have a shp file( with .shx, and .dbf) and want to convert it to a
different projection. When I run ogr2ogr from command line, it doesn't
do anything, I tried to set the debug level for more verbose and there
is not enough information to get debug to work. I assume debug is like
verbose. I tried --debug [on], --debug 1. Just get back usage description.
Here is the command I'm using:
ogr2ogr -f "ESRI Shapefile" -t_srs EPSG:32610 myfile.shp mynewfile.shp
it just returns the usage description help file. No errors, no way of
knowing what is wrong. I looked online at gdal.org and it is almost
worthless for help.
p.s. I also have "Desktop GIS" by Gary Sherman and not all the book
examples work(pg 188).thanks,
Tom
_______________________________________________
grass-user mailing list
grass-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.
More information about the grass-user
mailing list