[OSRS-PROJ] Wrapping projections
Glynn Clements
glynn.clements at virgin.net
Fri May 31 00:06:42 PDT 2002
Paul Selormey wrote:
> > A concrete example:
> >
> > What I get currently:
> >
> > http://freespace.virgin.net/glynn.clements/map1.png
> >
> > What I want:
> >
> > http://freespace.virgin.net/glynn.clements/map2.png
> >
> > Should PROJ be doing this? The problem is, if PROJ doesn't do it, the
> > caller can't (in this case the caller could reject longitudes outside
> > of [-pi,pi], but it can't handle the latitudinal wrap without knowing
> > the details of the projection).
>
> From my observation of projections in other software, it should be the
> second it.
> Unless there is a special use of the first, the patch is highly welcomed. If
> there is
> a need for the second, then there is a need to have an option for the use to
> choose.
>
> BTW, is this the only projection affected?
I haven't tried all of them; it also occurs with Wagner II, but not
Wagner III (the caller, GRASS' r.proj, silently wraps longitudes but
traps latitudes outside of [-pi/2,pi/2]). The determining factor will
be passing the (scaled) y coordinate to sin/cos without checking the
range first.
In retrospect, the longitude case should be trapped outside of PROJ
(so long as PROJ itself isn't wrapping it; i.e. so long as an
out-of-range x coordinate produces an out-of-range longitude).
--
Glynn Clements <glynn.clements at virgin.net>
----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.
More information about the Proj
mailing list