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

Andre Joost andre+joost at nurfuerspam.de
Fri May 17 10:21:29 PDT 2013


Am 17.05.2013 19:00, schrieb Thomas Campagne:

> When I run cs2cs -v +init=epsg:4267 I still do not understand how the
> +nadgrids=@conus, at alaska, at ntv2_0.gsb, at ntv1_can.dat parameter is being
> generated as I cannot find it within the text/csv files.
>

EPSG:4267 expands to
+proj=longlat +datum=NAD27 +no_defs

and the nadgrids are in the "+datum=NAD27". This is hardcoded in
<http://trac.osgeo.org/proj/browser/trunk/proj/src/pj_datums.c>
> "NAD27",    "nadgrids=@conus, at alaska, at ntv2_0.gsb, at ntv1_can.dat",
> 	                                                     "clrk66",
> 	                                "North_American_Datum_1927",


> Any idea about which files to edit to add the nadgrids parameter to
> the proj string referenced by a given EPSG code (4202 for AGD66 as
> example)?


You could add a line for AGD66 datum and nadgrid file in the file, and 
compile from source. And you have to change the share/proj/epsg file to 
use your datum istead of +towgs84.

Or try to insert the +nadgrids=<filename> for the AGD66 entry directly.

HTH,
André Joost




More information about the gdal-dev mailing list