[OSRS-PROJ] remotesensing.org PROJ reading datum gridshift files unnecessarily?

Paul Kelly paul-grass at stjohnspoint.co.uk
Wed Jul 23 04:24:26 EDT 2003

Hello Markus

On Wed, 23 Jul 2003, Markus Neteler wrote:

> Hello Paul,
> On Tue, Jul 22, 2003 at 12:39:30PM +0100, Paul Kelly wrote:
> > Hello Markus
> > That seems to be a problem in the new functions recently added to 5.1
> > ps.map. I will look at it in more detail later but for now I can only
> > think that perhaps it is trying to re-project points that are outside the
> > boundaries of the conus conversion grid. Try changing
> > nadgrids: conus
> > in the PROJ_INFO to
> > nadgrids: @conus
> > (I think I have the syntax right.) This is a recent addition to PROJ that
> > allows to re-project points outside the coverage area of the shift file,
> > but gives them a zero shift (instead of just failing with an error).
> >
> > However there are several things that cause the PROJ 'failed to load...'
> >  error; something else could be wrong.
> I found it! I was using geogrid with 10000 m assuming that "m" is
> meters, but it's "minutes" of course. After changing to 60 s (seconds)
> ps.map works well.
> So: RTFM... :-(
> Sorry for taking your time,

Still, IMHO I don't think it should have been trying to load the datum
shift file when the output co-ordinate system did not have a datum
specified, i.e. whether or not the input point is inside the region
covered by the shift file is relevant only if we are doing a datum shift,
not if just doing the inverse projection from projected co-ordinates to
lat/long. In this case I feel the PROJ pj_transform() function should just
do the inverse projection (although the fact that it refused was a useful
warning to you that something was wrong with your input values).

Maybe Frank can help (copied to PROJ list). I feel the call to
pj_datum_transform() in pj_transform() should be conditional on
( srcdefn->datum_type != PJD_UNKNOWN
  && dstdefn->datum_type != PJD_UNKNOWN )
however it is far from clear what is the obvious solution and I don't
pretend to fully understand the code there.


PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.

More information about the Proj mailing list