Thanks André!

I will add a line for AGD66 datum and nadgrid file in pj_datums.c, and make the 
appropriate change in the epsg file , and compile from source. 

Is possible to default to the use of +towgs84 when there is no successful grids 
with +nadgrids?

For New-Zealand the line in pj_datums.c is:
"nzgd49",       "nadgrids=nzgd2kgrid0005.gsb",  "intl",  "New Zealand Geodetic 
Datum 1949"
And the epsg file contains:
# NZGD49
<4272> +proj=longlat +datum=nzgd49 +no_defs  <>

Could the following work if points are not located within the area covered by 
the NTv2 file?

pj_datums.c contains:
"nzgd49",       " [email protected] ",       "intl", "New Zealand 
Geodetic Datum 1949"
And the epsg file contains:
# NZGD49
<4272> +proj=longlat +datum=nzgd49 + 
towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +no_defs  <>



-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Andre Joost
Sent: May-17-13 10:21 AM
To: [email protected]
Subject: Re: [gdal-dev] How to set GDAL/cs2cs/proj to use NTv2 grid shift file 
when using EPSG codes?

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,@alaska,@ntv2_0.gsb,@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,@alaska,@ntv2_0.gsb,@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


_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to