[GRASS-user] ogr2ogr help

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@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@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.

Brent Wood wrote:

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.

check this out:
  http://www.inventis.ca/ogr2gui/index_en.htm

"Through its graphical user interface, ogr2gui gives all the power of
ogr2ogr without worrying about its complex syntax. It brings speed,
efficiency and simplicity to its users."

enjoy,
Hamish

Hamish ha scritto:

check this out:
  http://www.inventis.ca/ogr2gui/index_en.htm

Only for win, it seems (unfortunately!).
All the best.
pc
--
Paolo Cavallini, see: * http://www.faunalia.it/pc *

Hamish ha scritto:

> check this out:
> http://www.inventis.ca/ogr2gui/index_en.htm

Paolo wrote:

Only for win, it seems (unfortunately!).

Binary installer on the website is only for MS Windows, but, it builds
for Linux* too. See the Linux section of the BUILDING file in the v0.5
..tar.gz source tarball.

[*] and thus UNIX, and thus Mac OSX

It is based on the cross platform wxWidgets+GTK libraries, and actually
the MS Windows port requires MSys and MinGW, so it is genetically a UNIX
app at its core.

regards,
Hamish