[GRASS5] problems with [rsv].proj

Morten Hulden morten at ngb.se
Wed May 29 04:42:14 EDT 2002


On Wed, 29 May 2002, Glynn Clements wrote:

> > boundaries.  There's a comparison between some xmin, ymin, etc. and the
> > region boundaries, and it comes up that ymin is slightly larger (1E-6)
> > than to_hd->north (this difference is way way below the significant
> > decimal places of the projection, which isn't better than a couple
> > places).  There's some subtle numerical bug in there...

I don't think this has anything to do with the bug you are looking for,
but: 

No, not a numerical bug. At the start of the bordwalk routine xmin, xmax,
ymin, ymax are intentionally set to (unreasonable) values slightly
larger/smaller than east, west, north, south respectively. At the end, if
any of these variables are still outside the borders it means no point
along borders of source map fell inside the destination area.

So, if you get ymin > to_hd->north at the end of bordwalk, it means all of 
the cell centers along the lower border of the source map had (projected)
y-values greater than 'north' in the destination area. Thus 'input area is 
outside current region'. 


> [Aside: there are cases where the "border walking" algorithm won't
> produce the right results (e.g. converting polar stereographic to any
> cylindrical projection), but I doubt that such cases are relevant to
> "real world" use.]

Have you tested this in practice? With bordwalk r.proj should be able to 
produce maps composed of discontinous areas. I tested it with some other 
projections when I wrote the code, but not with polar stereographic. One 
reason for writing bordwalk.c was that in the previous version of r.proj 
you could only do reliably cylindrical->cylindrical projections.

Morten Hulden





More information about the grass-dev mailing list