[GRASS-dev] pj_transform problem: failed to load NAD27-83 correction file

Hi list,

I am trying to make a program writing a latitude map. it works in a
lat/lon projection, but the only non-ll mapset i have is Spearfish,
and when testing on it, it returned this:

pj_transform() failed
cause: failed to load NAD27-83 correction file

GRASS_INFO_ERROR(19542,1): Error in pj_do_proj

How can i get through this problem? is it a problem in compilation of proj?
thanks,
Yann

After some more research...

the Proj 449 version has already the conus bin in /usr/share/proj/
along with nad27 and nad83 files.

PROJLIB was empty, export $PROJLIB=/usr/share/proj/ as mentioned in
proj website, no change. But this may not affect how Proj code is used
in GRASS, so...

...wondered if the configure of GRASS went wrong, but it says:
checking for location of External PROJ.4 includes...
checking for proj_api.h... yes
checking External PROJ.4 version... 449
checking for location of External PROJ.4 library...
checking for pj_get_def in -lproj... yes
checking for location of External PROJ.4 data files... /usr/share/proj
checking for /usr/share/proj/epsg... yes
checking for nad2bin... /usr/bin/nad2bin

So far so good... Just wonder if there is anything more in the
configure file to be set? Or should it be a proj recompile?

Anybody used a proj449 and NAD?

Yann

On 13/10/06, Yann Chemin <ychemin@gmail.com> wrote:

Hi list,

I am trying to make a program writing a latitude map. it works in a
lat/lon projection, but the only non-ll mapset i have is Spearfish,
and when testing on it, it returned this:

pj_transform() failed
cause: failed to load NAD27-83 correction file

GRASS_INFO_ERROR(19542,1): Error in pj_do_proj

How can i get through this problem? is it a problem in compilation of proj?
thanks,
Yann

--
Some Google Working rules:
* Developers can switch teams and/or projects any time they want, no
questions asked; just say the word and the movers will show up the
next day to put you in your new office with your new team.
* There aren't very many meetings. I'd say an average developer
attends perhaps 3 meetings a week.
* Google has a philosophy of not ever telling developers what to work
on, and they take it pretty seriously.
* Google tends not to pre-announce. They really do understand that you
can't rush good cooking, you can't rush babies out, and you can't rush
software development.

On Fri, 13 Oct 2006, Yann Chemin wrote:

Hi list,

I am trying to make a program writing a latitude map. it works in a
lat/lon projection, but the only non-ll mapset i have is Spearfish,
and when testing on it, it returned this:

       ^^^^^^^^^^^^
What exactly are you doing to test it (areas covered by locations, command line used etc.)? Are you sure the data you're trying to project falls within the area covered by the conus datum transformation grid used in Spearfish? PROJ emits that same error message for a rather large variety of different error conditions so it's hard to know exactly what's going on.

pj_transform() failed
cause: failed to load NAD27-83 correction file

GRASS_INFO_ERROR(19542,1): Error in pj_do_proj

How can i get through this problem? is it a problem in compilation of proj?
thanks,
Yann

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

Here is the code:
it simply fills up the pixels with Latitude values.

http://www.star.ait.ac.th/~yann/sebal/r.latitude.tar.gz

You may run it on any raster (i.e. elevation.10m) in Spearfish and it
will return that error.

thanks
yann

On 20/10/06, Paul Kelly <paul-grass@stjohnspoint.co.uk> wrote:

On Fri, 13 Oct 2006, Yann Chemin wrote:

> Hi list,
>
> I am trying to make a program writing a latitude map. it works in a
> lat/lon projection, but the only non-ll mapset i have is Spearfish,
> and when testing on it, it returned this:
       ^^^^^^^^^^^^
What exactly are you doing to test it (areas covered by locations, command
line used etc.)? Are you sure the data you're trying to project falls
within the area covered by the conus datum transformation grid used in
Spearfish? PROJ emits that same error message for a rather large variety
of different error conditions so it's hard to know exactly what's going
on.

>
> pj_transform() failed
> cause: failed to load NAD27-83 correction file
>
> GRASS_INFO_ERROR(19542,1): Error in pj_do_proj
>
> How can i get through this problem? is it a problem in compilation of proj?
> thanks,
> Yann
>
> _______________________________________________
> grass-dev mailing list
> grass-dev@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>

--
Some Google Working rules:
* Developers can switch teams and/or projects any time they want, no
questions asked; just say the word and the movers will show up the
next day to put you in your new office with your new team.
* There aren't very many meetings. I'd say an average developer
attends perhaps 3 meetings a week.
* Google has a philosophy of not ever telling developers what to work
on, and they take it pretty seriously.
* Google tends not to pre-announce. They really do understand that you
can't rush good cooking, you can't rush babies out, and you can't rush
software development.

Yann Chemin wrote:

> > I am trying to make a program writing a latitude map.

..

it simply fills up the pixels with Latitude values.
http://www.star.ait.ac.th/~yann/sebal/r.latitude.tar.gz

Here is how to do it in a shell script, using r.stats, m.proj, and
r.in.xyz. (slower than a C version, but uses just standard grass modules
and unix tools)

r.stats -1gn fields | cut -f1,2 -d' ' > fields_coord.txt
# datum will be WGS84!! use "proj_out=" if you want another datum
m.proj -od < fields_coord.txt | awk '{print $2}' > lat_values.txt
paste -d' ' fields_coord.txt lat_values.txt > fields_lat_coord.txt
r.in.xyz in=fields_lat_coord.txt fs=space out=fields_lat
\rm fields_coord.txt lat_values.txt fields_lat_coord.txt

another idea is to add lat() and lon() as r.mapcalc internal variables,
just like x() and y(). But you must deal with the "which datum to use?"
problem.

Hamish