[Gdal-dev] Newbie Question - setting projection when using ogr2ogr utility

Frank Warmerdam warmerdam at pobox.com
Tue Nov 14 21:54:17 EST 2006


Barnaby Burman wrote:
> Hi,
> 
> I am new to using org2ogr, and wish to use it to translate some ArcView
> Shape files into MapInfo Table format. The translation works fine when using
> the standard commands, but I want to set the projection to OSGB 1936.
> 
> At present, I'm quite stuck on the setting the projection type using SRS -
> has anyone got an idea as to how this can be set?
> 
> This works example string works for the conversion, but doesn't set the
> projection:
> 
> ogr2ogr -f "MapInfo File" -select XSP r1-xsp.tab r1-xsp.shp
> 
> Thanks if anyone can be of assistance,

Barnaby,

I think you would want to add an -a_srs option something like:

ogr2ogr -a_srs '+proj=latlong 
+towgs84=446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894 +ellps=airy'
...

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list