[Proj] Problem loading grid shift file
Frank Warmerdam
warmerdam at pobox.com
Mon Apr 10 06:12:09 PDT 2006
Anthony Dunk wrote:
> 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!
Anthony,
I didn't see any problems with how you were calling pj_transform(). The
grid shift files should be searched for in the directory pointed to
by the PROJ_LIB environment variable. If that environment variable is not
found it should default to a builtin directory, often c:\PROJ\NAD.
If you define the PROJ_DEBUG environment variable (to YES for instance) you
should see some debug output in the console indicating where PROJ.4 is
searching for the files.
You can also use the pj_set_searchpath() function to define a list of
directories to search.
By the way 4.4.6 is a bit old now. You might consider upgrading to 4.4.9.
Some of the above mentioned functions may not exist in 4.4.6.
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 | President OSGF, http://osgeo.org
More information about the Proj
mailing list