[Proj] lat/long to northing/easting and back again

Roger Oberholtzer roger at opq.se
Mon Mar 16 10:39:30 EST 2009


On Mon, 2009-03-16 at 11:04 -0400, Gerald I. Evenden wrote:
> On Monday 16 March 2009 8:37:30 am Roger Oberholtzer wrote:
> > On Mon, 2009-03-16 at 13:38 +0200, support.mn at elisanet.fi wrote:
> > > Hello,
> > >
> > > how about using pj_inv() in the proj.4 library?
> >
> > OK. But does that do an inverse of all projections? I seem to recall a
> > discussion a few months ago about this. IIRC, not all inverse
> > calculations has the same accuracy. In fact, I have some flexibility in
> > which forward calculation is done: it will only be used internally.
> > Externally, all will be WGS84 lat/longs.
> 
> I tremble at the thought of getting into this thread but here goes:
> 
> First, interpolating positions from easting/northing values is shaky and 
> accuracy of such efforts is highly dependent upon the distance between points 
> used in the operation.

The distance is in the order of meters. Typically less than 10. Why
interpolate in such small distances? Don't ask...

> RECOMENDATION/REQUIREMENT: Doing this operation requires someone who is 
> familiar with projections (or at least the one selected) and their proper use 
> and limitations.
> 
> Secondly, before starting on this project check if the projection selected has 
> an inverse.  Fairly easy to do: 1) do a forward and 2) see if the inverse of 
> the just computed forward x/y executes and returns the original lat/lon.
> 
> Not too complicated.

That is what I am doing now. I am trying to see how to use the library
to do this. My use thus far has been to go the opposite direction, using
pj_init_plus and pj_transform. Works like a charm.

I am guessing I would reverse the first two parameters to pj_transform
to get the inverse. Or is that too simplistic?

-- 
Roger Oberholtzer

OPQ Systems / Ramböll RST

Ramböll Sverige AB
Krukmakargatan 21
P.O. Box 17009
SE-104 62 Stockholm, Sweden

Office: Int +46 8-615 60 20
Mobile: Int +46 70-815 1696



More information about the Proj mailing list