[GRASS-user] ogr2ogr help

mtnbiketrail at zzz.com mtnbiketrail at zzz.com
Sun Jan 25 20:07:53 EST 2009


Thanks.
I see I missed that output file goes first.

I would have thought a 3d shape file has  coordinate system embedded in 
it.  Otherwise the only info I have is that it is NAD83 UTM Zone 10. 
Indeed, ogrinfo says  Layer SRS WKT: (unknown)

I looked on the spatialreference.org website and I have 3 choices. 
3717(which I think it is not, as this shp file was made in 2006, 3740, 
and 26910. How do I guess?


José María Michia wrote:
> 2009/1/25  <mtnbiketrail at zzz.com>:
>   
>> 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
>>     
>
> Hi Tom. I think that you have an error syntax, at least. You must
> write first the name of the destination shape file, and later the name
> of the source shape file.
>
> Try this:
>
> ogr2ogr -f "ESRI Shapefile" -t_srs EPSG:32610  mynewfile.shp myfile.shp
>
> Also, make sure that your source shape file, has a coordinate system
> defined. You can verify this using ogrinfo:
>
> ogrinfo -so myfile.shp myfile
>
> If not, use the option "-s_srs" to assign one, like following:
>
> ogr2ogr -f "ESRI Shapefile" -s_srs EPSG:4326 -t_srs EPSG:32610
> mynewfile.shp myfile.shp
>
> Change EPSG:4326 to the correct epsg code.
>
> I hope that be useful.
>
> Saludos
> José María
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.176 / Virus Database: 270.10.13/1914 - Release Date: 1/24/2009 8:40 PM
>
>   



More information about the grass-user mailing list