[GRASS5] [bug #2537] (grass) aitoff/winkel tripel fails on rasters

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

Subject: aitoff/winkel tripel fails on rasters

Platform: other
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: cvs 20040710

When trying to project a raster from geographic (or any other projection) to a Winkel Tripel or Aitoff,
r.proj spews out VERY many

pj_transform() failed
cause: non-convergent inverse meridinal dist

errors, then gives up with:

ERROR: Input map is outside current region

and stops. The region is correct - I use proj (or m.proj2 in grass53) to determine the extents
needed. And it projects vectors (v.proj) just fine.

Problem with both GRASS 5.3 and 5.7, CVS 2004-7-10, Mac OS 10.3.4, GDAL 1.2.1 + PROJ 4.4.8
(also tried 4.4.7).

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

Request Tracker wrote:

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

Subject: aitoff/winkel tripel fails on rasters

When trying to project a raster from geographic (or any other
projection) to a Winkel Tripel or Aitoff, r.proj spews out VERY many

pj_transform() failed
cause: non-convergent inverse meridinal dist

errors, then gives up with:

ERROR: Input map is outside current region

and stops. The region is correct - I use proj (or m.proj2 in
grass53) to determine the extents needed. And it projects vectors
(v.proj) just fine.

Neither Aitoff nor Winkel Tripel have defined inverse projections, so
you can't project to those projections with r.proj; you can project
from them, though. v.proj and s.proj use forward projections, so they
don't have this problem (they have the opposite problem: you can
project to such projections, but not from them).

For projections which don't have an inverse, you can use a sequence of
r.to.sites, s.proj and s.surf.rst.

Although, we should make r.proj (or PROJ itself) handle this situation
better.

--
Glynn Clements <glynn.clements@virgin.net>

No good. I was hoping to use GRASS 5.7 - I tried r.to.vect to both point and area but I ran into some odd limit - both quit at 1105902 features. The error was that it couldn't insert a new row into the values.

So, your suggestion to use sites in GRASS 5.3 didn't work either. Even dividing the globe into 4 quarters. The conversion to sites worked, no problems with feature limits. They also projected fine. But I get a bus error in s.surf.rst after a while. (I've never had luck with s.surf.rst, maybe I'm using too much data). I was even using a cell size 1/4 of the original unprojected data (latlong 30" GLOBE DEM to 4000m projected).

A question about the inverse projection thing - is that a PROJ limitation, or a general limitation of the Aitoff/Winkel Tripel projection?

Kinda interesting sidenote - it seems ArcInfo & ArcGIS do a forward projection of rasters, so it doesn't have this problem. BUT, ArcInfo (that is, the old workstation stuff) has problems when anything but 0 deg is used as the central meridian - it cuts off the west 1/4. bleh. ArcGIS (that is, desktop stuff) is supposed to have fixed the problem, but you must use the new 'geodatabase' storage, which requires ArcSDE. Arrrrgggghhhhh!

Well, finally got it done by using Arc to convert to points and project and to raster (topogridtool 16 hrs!). Did the masking and relief with GRASS. phew!

On Jul 15, 2004, at 3:53 AM, Glynn Clements wrote:

Request Tracker wrote:

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

Subject: aitoff/winkel tripel fails on rasters

When trying to project a raster from geographic (or any other
projection) to a Winkel Tripel or Aitoff, r.proj spews out VERY many

pj_transform() failed
cause: non-convergent inverse meridinal dist

errors, then gives up with:

ERROR: Input map is outside current region

and stops. The region is correct - I use proj (or m.proj2 in
grass53) to determine the extents needed. And it projects vectors
(v.proj) just fine.

Neither Aitoff nor Winkel Tripel have defined inverse projections, so
you can't project to those projections with r.proj; you can project
from them, though. v.proj and s.proj use forward projections, so they
don't have this problem (they have the opposite problem: you can
project to such projections, but not from them).

For projections which don't have an inverse, you can use a sequence of
r.to.sites, s.proj and s.surf.rst.

Although, we should make r.proj (or PROJ itself) handle this situation
better.

-----
William Kyngesburye <kyngchaos@charter.net>
http://webpages.charter.net/kyngchaos/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro

William K wrote:

A question about the inverse projection thing - is that a PROJ
limitation, or a general limitation of the Aitoff/Winkel Tripel
projection?

I'm not sure how to interpret that question.

The proj library includes inverses for some projections, but not all,
and not for Aitoff or Winkel Tripel.

I suspect that these projections don't have a clearly defined inverse,
i.e. the inverse can't be defined in terms of an algebraic expression,
and there isn't a "standard" approximation.

--
Glynn Clements <glynn.clements@virgin.net>

On Jul 24, 2004, at 2:18 PM, Glynn Clements wrote:

William K wrote:

A question about the inverse projection thing - is that a PROJ
limitation, or a general limitation of the Aitoff/Winkel Tripel
projection?

I'm not sure how to interpret that question.

The proj library includes inverses for some projections, but not all,
and not for Aitoff or Winkel Tripel.

I suspect that these projections don't have a clearly defined inverse,
i.e. the inverse can't be defined in terms of an algebraic expression,
and there isn't a "standard" approximation.

I guess that's what I meant - whether PROJ chose not to include the inverse, or it's just not definable or available. I'm thinking not included - though I haven't tried, the Arc docs don't say it isn't possible. Maybe it's just difficult and ESRI spent the time (they certainly have the resources) to figure it out.

Oh well.

-----
William Kyngesburye <kyngchaos@charter.net>
http://webpages.charter.net/kyngchaos/

All generalizations are dangerous, even this one.

On Sat, Jul 24, 2004 at 06:37:00PM -0500, William K wrote:

On Jul 24, 2004, at 2:18 PM, Glynn Clements wrote:

>
>William K wrote:
>
>>A question about the inverse projection thing - is that a PROJ
>>limitation, or a general limitation of the Aitoff/Winkel Tripel
>>projection?
>
>I'm not sure how to interpret that question.
>
>The proj library includes inverses for some projections, but not all,
>and not for Aitoff or Winkel Tripel.
>
>I suspect that these projections don't have a clearly defined inverse,
>i.e. the inverse can't be defined in terms of an algebraic expression,
>and there isn't a "standard" approximation.
>
I guess that's what I meant - whether PROJ chose not to include the
inverse, or it's just not definable or available. I'm thinking not
included - though I haven't tried, the Arc docs don't say it isn't
possible. Maybe it's just difficult and ESRI spent the time (they
certainly have the resources) to figure it out.

Oh well.

William,

it might be a good idea to contact the PROJ4 people (the authors
of that library):

http://www.remotesensing.org/proj/
-> Mailing List

Maybe, if there is interest and the definitions available,
they'll implement it?

Markus