[GRASS5] [bug #2144] (grass) m.proj2 returns wrong answer if you use proj=longlat

Request Tracker grass-bugs at intevation.de
Wed Oct 1 06:50:26 EDT 2003


this bug's URL: http://intevation.de/rt/webrt?serial_num=2144
-------------------------------------------------------------------------

Subject: m.proj2 returns wrong answer if you use proj=longlat

Platform: GNU/Linux/i386
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 5.3-cvs 1stOct'3

This fails, either with proj=longlat or proj=latlong:

GRASS:~ > echo "167 -44" | m.proj2 inproj="proj=longlat,datum=wgs84" \
   outproj="proj=nzmg,ellps=intl"

Input Projection Parameters: +proj=longlat +a=6378137 +es=0.006694379990141316 +towgs84=0.000000,0.000000,0.000000

Output Projection Parameters: +proj=nzmg +a=6378388 +es=0.006722670022333322
pj_transform() failed
cause: latitude or longitude exceeded limits
ERROR: Error in pj_do_proj()
GRASS:~ >

(same if you use proj=latlong)



but works correctly if you use proj=ll:

GRASS:~ > echo "167 -44" | m.proj2 inproj="proj=ll,datum=wgs84" \
   outproj="proj=nzmg,ellps=intl"

Input Projection Parameters: +proj=latlong +a=6378137 +es=0.006694379990141316 +towgs84=0.000000,0.000000,0.000000

Output Projection Parameters: +proj=nzmg +a=6378388 +es=0.006722670022333322
2029166.972758 5672442.698821

GRASS:~ >

I'm a bit confused as to whether the parameters should be proj ones or GRASS ones.

note: specifiying datum in one set of parameters but not the other is buggy.


?
Hamish


-------------------------------------------- Managed by Request Tracker




More information about the grass-dev mailing list