[gdal-dev] How to set GDAL/cs2cs/proj to use NTv2 grid shift file when using EPSG codes?

Thomas Campagne thomasc at mirageoscience.com
Thu May 16 15:56:34 PDT 2013


Hi,

I am using the GDAL API for Python for a script that takes only EPSG codes for inputs to specify source and target coordinate systems.
While the cs2cs command seems to handle quite well transformation between NAD27 (EPSG:4267) and NAD83 (EPSG:4326) coordinates in North America, I would like to have similar capabilities for AGD66 (EPSG:4202) to GDA94 (EPSG:4283) and AGD84 (EPSG:4203) to GDA94 (EPSG:4283) in Australia.
When using the -v option with cs2cs to look at the proj string being used i get the following:
    >cs2cs -v +init=epsg:4267
    ># ---- From Coordinate System ----
    >#Lat/long (Geodetic alias)
    >#
    ># +init=epsg:4267 +proj=longlat +datum=NAD27 +no_defs +ellps=clrk66
    ># +nadgrids=@conus, at alaska, at ntv2_0.gsb, at ntv1_can.dat
    ># ---- To Coordinate System ----
    >#Lat/long (Geodetic alias)
    >#
    ># +proj=latlong +datum=NAD27 +ellps=clrk66
    ># +nadgrids=@conus, at alaska, at ntv2_0.gsb, at ntv1_can.dat
The nadgrids parameters tells cs2cs to use the best fitting datum grid shift file from conus, alaska, ntv2_0.gsb, and ntv1_can.dat.
For AGD66 (EPSG:4202) cs2cs returns:
    >cs2cs -v +init=epsg:4202
    ># ---- From Coordinate System ----
    >#Lat/long (Geodetic alias)
    >#
    ># +init=epsg:4202 +proj=longlat +ellps=aust_SA
    ># +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +no_defs
    ># ---- To Coordinate System ----
    >#Lat/long (Geodetic alias)
    >#
    ># +proj=latlong +ellps=aust_SA
    ># +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29
There is no nadgrids parameter but a towgs84 instead. A grid shift file from the ICSM; "A66 National (13.09.01).gsb" contains the shift between AGD66 and GDA94.
How can I make GDAL/cs2cs/proj identify this file when using EPSG codes?
I tried to reinstall GDAL/cs2cs/proj using the osgeo4w installer with A66 National (13.09.01).gsb within the directory containing the other datum shift files prior to the reinstallation but without success.

I also posted an enhancement ticket on Trac:
http://trac.osgeo.org/gdal/ticket/5085

Cheers

Thomas

[Description: cid:image002.gif at 01CBC6E3.6EDE0130]
Thomas Campagne, M.Sc. Geophysics, Consultant
ADVANCED GEOPHYSICAL INTERPRETATION CENTRE
www.MiraGeoscience.com<http://www.mirageoscience.com/>  tel +1 778 329 0430 ext 227, 512B - 409 Granville St, Vancouver, BC, V6C 1T2, Canada

+ Our Q2 eNewsletter 2013 is now out! You may download it here<http://goo.gl/9GDBi>.

+ August 11-14 We will be hosting a workshop at the ASEG Conference in Melbourne, Australia. Stop by Booth 49. More details here<http://www.mirageoscience.com/events/upcoming_events.php>.

+ August 12-15 We will be hosting a workshop at the SGA Biennial Meeting in Uppsala, Sweden. More details here<http://www.mirageoscience.com/events/upcoming_events.php>.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130516/fe533c0e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2275 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130516/fe533c0e/attachment.jpg>


More information about the gdal-dev mailing list