Wed, Oct 1 2003
12:50:26
|
|
Request created by guest
|
|
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
|
|
Wed, Oct 8 2003
12:31:48
|
|
Mail sent by pkelly
|
|
guest wrote (Wed, Oct 1 2003 12:50:26):
> Subject: m.proj2 returns wrong answer if you use proj=longlat
>
[...]
>
> (same if you use proj=latlong)
>
>
>
> but works correctly if you use proj=ll:
>
[...]
>
> I'm a bit confused as to whether the parameters should be proj ones or
GRASS ones.
It should be the GRASS names for everything (if you insist on using
m.proj ;) ). GRASS used proj=ll back in the early '90s when the standard proj
did not allow use a 'pseudo-projection' of lat/long and everything had to be
treated as either a forward or inverse projection from/to lat/long. When
Frank made his improvements he chose to use proj=latlong or proj=longlat, so
the GRASS 'proj=ll' was left as an historical oddity. As far as I can make
out anyway that is what has happened.
>
> note: specifiying datum in one set of parameters but not the other is buggy.
>
Is this PROJ bug 368? ( http://bugzilla.remotesensing.org/show_bug.cgi?
id=368 ) I have applied a fix to the internal PROJ in the GRASS CVS that
should fix this...could you maybe try that (compile 5.3 --with-proj=no)
Paul
|
|
Thu, Nov 6 2003
05:33:14
|
|
Mail sent by hbowman
|
|
> It should be the GRASS names for everything
Ok, this should be made clearer in the man page.
(I'll do that, have to add -i and -o anyway)
Maybe the error messages should be more verbose though?
> (if you insist on using m.proj ;) ).
Honestly, with the -i flag, it's really great for importing GPS data...
> >
> > note: specifiying datum in one set of parameters but not the other is
> > buggy.
> >
>
> Is this PROJ bug 368? ( http://bugzilla.remotesensing.org/show_bug.cgi?
> id=368 ) I have applied a fix to the internal PROJ in the GRASS CVS that
> should fix this...could you maybe try that (compile 5.3 --with-proj=no)
Yes, that is what I was referring to.
Hamish
|
|
Sun, Nov 9 2003
03:30:51
|
|
Comments added by hbowman
|
|
Just to note I also have to add support to m.proj2 for DDD:MM:SS format.
Currently using that format gives the wrong answer.
Hamish
|
|
Mon, Feb 5 2007
22:02:16
|
|
Mail sent by mneteler
|
|
Hamish,
does the new m.proj solve the problem?
Markus |
|
Tue, Feb 6 2007
07:21:39
|
|
Mail sent by hamish_nospam@yahoo.com
|
|
Return-Path |
<hamish_nospam@yahoo.com>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
Date |
Tue, 6 Feb 2007 19:21:30 +1300
|
From |
Hamish <hamish_nospam@yahoo.com>
|
To |
Markus Neteler via RT <grass-bugs@intevation.de>
|
Cc |
Paul Kelly <paul-grass@stjohnspoint.co.uk>
|
Subject |
Re: [bug #2144] (grass) m.proj2 returns wrong answer if you use proj=longlat
|
Message-Id |
<20070206192130.4fa85246.hamish_nospam@yahoo.com>
|
In-Reply-To |
<20070205210216.D1A351006B7@lists.intevation.de>
|
References |
<20070205210216.D1A351006B7@lists.intevation.de>
|
X-Mailer |
Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
|
X-Face |
M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
|
Mime-Version |
1.0
|
Content-Type |
text/plain; charset=US-ASCII
|
Content-Transfer-Encoding |
7bit
|
X-Virus-Scanned |
by amavisd-new at intevation.de
|
X-Spam-Status |
No, hits=-2.3 tagged_above=-999 required=3 tests=[BAYES_00=-5, FORGED_YAHOO_RCVD=2.7]
|
X-Spam-Level |
|
BUG 2144: http://intevation.de/rt/webrt?serial_num=2144
Markus Neteler via RT wrote:
> does the new m.proj solve the problem?
the new m.proj (shell script front end for cs2cs) only shares a name and
functionality with GRASS 5's m.proj2 (C module).
cs2cs treats latlong or longlat the same apparently:
G63> echo "167 -44" | m.proj proj_in="+proj=longlat +a=6378137 +es=0.006694379990141316
+towgs84=0,0,0" proj_out="+proj=nzmg +a=6378388 +es=0.006722670022333322"
2029173.65 5672351.61 -206.99
G63> echo "167 -44" | m.proj proj_in="+proj=latlong +a=6378137 +es=0.006694379990141316
+towgs84=0,0,0" proj_out="+proj=nzmg +a=6378388 +es=0.006722670022333322"
2029173.65 5672351.61 -206.99
Paul will probably be able to answer this better, but there was some
confusion about lat/lon being called ll,latlong,longlat -- perhaps this
was one of the places GRASS libproj departed from the official PROJ.4s?
lib/proj/get_proj.c has both latlong and longlat in it.
lib/proj/convert.c just has longlat.
I'm not sure if this was ever fully resolved.
I've got some vague memory that latlong might be for when the data was
fed as "y,x" but this proved highly confusing and was dropped? maybe
just a dream.
As for the m.proj2 bug in GRASS 5, we can archive it with a "won't fix" tag.
Hamish
|
|