[OSRS-PROJ] problem with nad_init and initializing ntv1_can.dat
Frank Warmerdam
warmerdam at pobox.com
Thu Nov 20 06:42:48 PST 2003
Charles Seaton wrote:
> I am wondering if the functions for handling the initialization of the
> Canadian datums NTv1 and NTv2 have been moved out of nad_init into some
> other function, or whether these functions have somehow been lost. I
> have looked through the mailing list archives for any mention of this
> problem, and I have not found anything.
Charles,
The short answer is "yes". The datum shifting code was substantially
restructured when NTv2 support was incorporated last winter. The nad_init
is just used for old style PROJ.4 datum shift files, and not for
NTv1 or NTv2 files.
I would strongly encourage you to use the pj_init() and pj_transform()
functions to do datum shifts if possible. So, for instance, to apply
a datum shift from NAD27 to NAD83 create a projPJ handle for
"+proj=latlong +nadgrids=ntv1_can.dat" and "+proj=latlong +datum=NAD83" using
pj_init_plus(), then use pj_transform() to convert between them.
If you have to go in deeper review the pj_datum_transform(),
pj_apply_gridshift() and various gridinfo functions to better understand
how things work.
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 | Geospatial Programmer for Rent
----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.
More information about the Proj
mailing list