[Proj] Problem loading grid shift file

Anthony Dunk AnthonyD at rocketmail.com
Mon Apr 10 00:44:05 EDT 2006


Hi,

I'm using PROJ 4.4.6 (March 2003). The problem I have is that when I
enter the following command string from cs2cs (rel 4.4.7 31 March 2003)
it works however doing the same via the pj_transform() command in the
proj.dll gives me an error message of "failed to load NAD27-83
correction file".

cs2cs +proj=latlong a=6378160.0 +rf=298.25
+nadgrids=A66_National_13.09.01.gsb +to +proj=latlong +a=6378137
+rf=298.257222

What is the difference between using cs2cs and pj_transform(). And what
are rules governing how PROJ4 finds the grid shift files ? I have
placed my (Australian) *.gsb file in the same directory as the exe file
of the program I'm testing and also in C:\PROJ and in C:\PROJ\nad. The
program cannot find it wherever I seem to put it!

Here's the strings I'm using to create the source and target projection
objects for use with pj_transform():

m_PJSource = pj_init_plus("+proj=latlong +a=6378160.0 +rf=298.25
+nadgrids=A66_National_13.09.01.gsb");

and

m_PJDest = pj_init_plus("+proj=latlong +a=6378137.0 +rf=298.257222");

Then calling:

pj_transform(m_PJSource,m_PJDest,1,1,&dX,&dY,&dZ);

Where dX, dY are doubles containing lat/long coords converted to
radians and dZ=0.0. (These are defined double dX,dY,dZ;)

Where am I going wrong ??

Thanks,
Anthony.



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Proj mailing list