[GRASS5] datum transforms...

Paul Kelly paul-grass at stjohnspoint.co.uk
Wed Apr 16 10:13:31 EDT 2003


On Thu, 13 Mar 2003, Markus Neteler wrote:

> On Thu, Mar 13, 2003 at 03:31:43PM +0000, Paul Kelly wrote:
> >
> > On Thu, 13 Mar 2003, Markus Neteler wrote:
> >
> > > Suggestion: the [srv].proj could print the *used* proj info as well,
> > > along with the transformed boundary coordinates (the latter is already
> > > in r.proj). Then the user would know if datum/ellipsoid were picked up
> > > as expected.
> >
> > I have done this already for debugging it, but it involved printing out
> > the parameters from inside the library function pj_get_kv(). Printing to
> > stderr from a library function probably isn't good as it mightn't suit all
> > the programs that would be calling it. But it would be more awkward to put
> > it into the user programs as well as extra work having to change all 3 of
> > them. I'm not sure what would be the best way but will think about it when
> > I have time.

I've worked out a better way of doing this using the new PROJ.4
pj_get_def() function, which expands the projection paramters into a
string as would be used for cs2cs input. So today I have implemented this
in the three programs [rsv].proj. But something unusual that this has
turned up is that v.proj appears to be using the same parameters for the
input and output projection, and a quick glance at the source code shows
that it sets both the output *and* input paramters after changing location
to the input location (r.proj and s.proj set the output parameters right
at the start before changing location).

I must have missed something as v.proj can't have been broken all this
time; does anybody use it and can confirm what I am missing? I have only
ever used r.proj and s.proj for real work before.

Paul




More information about the grass-dev mailing list