[GRASS5] Projection programs

Bob Covill bcovill at tekmap.ns.ca
Mon Feb 3 09:09:32 EST 2003


I have latest CVS GRASS and have found a couple of projection programs
are not quite working. I discovered the problem when using m.ll2db which
converts to and from GRASS database and Lat. Long. coordinates. When I
run the program I get the following error ...
cannot initialize pj
cause: major axis or radius = 0 or not given

The problem is with how the "ll" projection is initialized, namely ...
parms_in[0] = '\0';
pj_get_string(&info_in, parms_in);

If I change this to a better qualified initialization such as ...

sprintf(ll_buf, "+proj=ll +ellsp=wgs84"); /* +datum also works with
current setting */
pj_get_string(&info_in, ll_buf);

it works fine. This problem has implications with other programs such as
m.proj(2), and v.in.gshhs. There may be others with this type of

You seem to be a few steps ahead on the PROJ stuff. Should the code be
fixed (m.proj seems to be on the chopping block) or do you have other

Bob Covill

Tekmap Consulting
P.O. Box 2016
Fall River, N.S.
B2T 1K6

E-Mail: bcovill at tekmap.ns.ca
Phone: 902-860-1496
Fax: 902-860-1498

More information about the grass-dev mailing list