[GRASS-user] reprojection from/to gnomonic projection two years later

Hello,

I am referring to the reprojection problem of GRASS6.x described here:
http://www.intevation.de/rt/webrt?display=History&serial_num=3630

To sum up, the GRASS version 5.3+ (i.e., the current version 6.2, too; I'v not
tested CVS version) incorrectly reprojects the maps between coordinate system
using gnomonic projection (using only sphere as a reference body) and any other
coordinate system with projection using ellipsoid. There is obvious erroneous
north-south shift of approx 0.19 degree (at 50 deg latitude), very likely due to
the different reference body (and mayby because of the mix of of
geodetic/geometric latitude - ?).

The system proj (http://proj.maptools.org/) works OK, there is not a problem.

The old [vr].proj in GRASS 5.0.3 is reprojecting perfectly, without any shift,
obviously handling the reference body correctly. I think that there could be
some possibility to fix the problem if this old version works OK. Maybe the
problem could have been connected with the introduction of the datum
transformation function in grass5.3 (http://grass.itc.it/devel/roadmap.php).

I would like to ask if there is a possibility to fix the shortcoming.
As a workaround, I still have to maintain the old version of GRASS 5.0.3 at one
computer just for the reprojections using gnomonic projection. For some
reprojection tasks I have available external programs, but the correction of the
above mentioned error would be very helpful. If the correction of the error (or
feature?) :o) is not planned in the future, let me know, too, please.

BTW, is anywhere a repository of old GRASS 5.0.3 for cygwin? I'v found only
GRASS 5.4.

Thanks in advance for any response.

Milan Salek

--
    ___________
    \ o o / Milan Salek
     \ ^ / Regionalni predpovedni pracoviste
      \ ~ / Regional Forecasting Office Brno
      ( ( ) ) Czech Hydrometeorological Institute
    ( ( . ) ) Kroftova 43, 616 67 Brno, Czech Republic
  ( ( . ) )
(____________) ) tel.: +420-541 421 072
      //// fax : +420-541 421 018
     //// E-mail: salek@chmi.cz
                   cell phone: +420-724 185 618
http://www.chmi.cz

Ceska meteor. spolecnost / Czech Meteorological Society:
http://www.chmi.cz/poboc/BR/metspol/metspol.html
------------------------------------------------------------

On Mon, 18 Jun 2007, Milan Salek wrote:

Hello,

I am referring to the reprojection problem of GRASS6.x described here:
http://www.intevation.de/rt/webrt?display=History&serial_num=3630

To sum up, the GRASS version 5.3+ (i.e., the current version 6.2, too; I'v not
tested CVS version) incorrectly reprojects the maps between coordinate system
using gnomonic projection (using only sphere as a reference body) and any other
coordinate system with projection using ellipsoid. There is obvious erroneous
north-south shift of approx 0.19 degree (at 50 deg latitude), very likely due to
the different reference body (and mayby because of the mix of of
geodetic/geometric latitude - ?).

The system proj (http://proj.maptools.org/) works OK, there is not a problem.

The old [vr].proj in GRASS 5.0.3 is reprojecting perfectly, without any shift,
obviously handling the reference body correctly. I think that there could be

The difference is, GRASS < 5.3 uses the PROJ.4 functions pj_fwd() and pj_inv() internally, while GRASS >= 5.3 uses pj_transform() internally. So to get to the bottom of the difference you need to investigate why pj_transform() handles things differently. I know pj_transform() does some kind of ellipsoid conversion that I don't quite understand.

BUT, as I said in the bug report it is not valid to use the PROJ.4 Gnomonic projection on an ellipsoid; it is only valid for a sphere:
"According to the output of the "proj -lP" command:
gnom : Gnomonic
         Azi, Sph.
gnomonic projection can only be used with a spherical earth model. So you
are going to get undefined behaviour / errors if re-projecting between an
ellipsoid and a sphere."

The fact that you get the results you want with GRASS < 5.3 does NOT necessarily mean that is "working properly". It could be two bugs cancelling each other out or some such. The issue is beyond GRASS. If you really want to get to the bottom of it you're going to have to take it up on the PROJ mailing list. It would be helpful before doing that, if you could re-produce the behaviour with a point on the command line using the proj command (which uses pj_fwd()/pj_inv(), and should give you what you want) and the cs2cs command (which uses pj_transform()) and should "hopefully" give the "wrong" results.

Paul

some possibility to fix the problem if this old version works OK. Maybe the
problem could have been connected with the introduction of the datum
transformation function in grass5.3 (http://grass.itc.it/devel/roadmap.php).

I would like to ask if there is a possibility to fix the shortcoming.
As a workaround, I still have to maintain the old version of GRASS 5.0.3 at one
computer just for the reprojections using gnomonic projection. For some
reprojection tasks I have available external programs, but the correction of the
above mentioned error would be very helpful. If the correction of the error (or
feature?) :o) is not planned in the future, let me know, too, please.

BTW, is anywhere a repository of old GRASS 5.0.3 for cygwin? I'v found only
GRASS 5.4.

Thanks in advance for any response.

Milan Salek

--
   ___________
   \ o o / Milan Salek
    \ ^ / Regionalni predpovedni pracoviste
     \ ~ / Regional Forecasting Office Brno
     ( ( ) ) Czech Hydrometeorological Institute
   ( ( . ) ) Kroftova 43, 616 67 Brno, Czech Republic
( ( . ) )
(____________) ) tel.: +420-541 421 072
     //// fax : +420-541 421 018
    //// E-mail: salek@chmi.cz
                  cell phone: +420-724 185 618
http://www.chmi.cz

Ceska meteor. spolecnost / Czech Meteorological Society:
http://www.chmi.cz/poboc/BR/metspol/metspol.html
------------------------------------------------------------

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

Hello,

thanks to Paul Kelly and Frank Warmerdam (http://proj.maptools.org/), the below
mentioned issue is solved; when I simply added: "nadgrids:@null" to the
projection definition file (PROJ_INFO), then I obtained correct results. Cited
from Frank's mail:

"The trick to having cs2cs (or anything based on pj_transform()) apply no
change to coordinates when going from the sphere to WGS84 is to add
+nadgrids=@null to your gnomonic (or spherical projection) definition."

Milan

Milan Salek wrote:

Hello,

I am referring to the reprojection problem of GRASS6.x described here:
http://www.intevation.de/rt/webrt?display=History&serial_num=3630

To sum up, the GRASS version 5.3+ (i.e., the current version 6.2, too; I'v not
tested CVS version) incorrectly reprojects the maps between coordinate system
using gnomonic projection (using only sphere as a reference body) and any other
coordinate system with projection using ellipsoid. There is obvious erroneous
north-south shift of approx 0.19 degree (at 50 deg latitude), very likely due to
the different reference body (and mayby because of the mix of of
geodetic/geometric latitude - ?).

The system proj (http://proj.maptools.org/) works OK, there is not a problem.

The old [vr].proj in GRASS 5.0.3 is reprojecting perfectly, without any shift,
obviously handling the reference body correctly. I think that there could be
some possibility to fix the problem if this old version works OK. Maybe the
problem could have been connected with the introduction of the datum
transformation function in grass5.3 (http://grass.itc.it/devel/roadmap.php).

I would like to ask if there is a possibility to fix the shortcoming.
As a workaround, I still have to maintain the old version of GRASS 5.0.3 at one
computer just for the reprojections using gnomonic projection. For some
reprojection tasks I have available external programs, but the correction of the
above mentioned error would be very helpful. If the correction of the error (or
feature?) :o) is not planned in the future, let me know, too, please.

BTW, is anywhere a repository of old GRASS 5.0.3 for cygwin? I'v found only
GRASS 5.4.

Thanks in advance for any response.

Milan Salek

--
    ___________
    \ o o / Milan Salek
     \ ^ / Regionalni predpovedni pracoviste
      \ ~ / Regional Forecasting Office Brno
      ( ( ) ) Czech Hydrometeorological Institute
    ( ( . ) ) Kroftova 43, 616 67 Brno, Czech Republic
  ( ( . ) )
(____________) ) tel.: +420-541 421 072
      //// fax : +420-541 421 018
     //// E-mail: salek@chmi.cz
                   cell phone: +420-724 185 618
http://www.chmi.cz

Ceska meteor. spolecnost / Czech Meteorological Society:
http://www.chmi.cz/poboc/BR/metspol/metspol.html
------------------------------------------------------------