Subject: Re: [geometry] Geometry extensions documentation, coordinate system definition and conversion.
From: Barend Gehrels (barend_at_[hidden])
Date: 2013-03-09 08:12:33
On 7-3-2013 22:44, Andrew Hundt wrote:
> Essentially, I would like to define the origin of a projected
> coordinate system to be A WGS84 lat long coordinate I pass in.
> Unfortunately standard UTM zones aren't accurate enough so I need to
> set the origin using the current lat/lon location at startup then do
> conversions using that.
> It looks like latlon.h and tmerc.h are what I want, how would I
> specify the lat/lon I want for the origin? Or is this perhaps not part
> of the embedded functionality?
> I've been looking at the examples, and it appears the conversions are
> mostly for lat-lon rather than lat-lon-altitude. Is it possible to
> handle points with altitude? If not, it looks like altitude
> conversions can be done with a simple offset when converting meters to
> meters, is that accurate?
> Also, would these conversion extensions be safe to use? I noticed the
> following comment in one of the examples:
> // BSG 28-10-2010
> // TODO: clear up this test
> // it is more a test than an example
> // the results are sometimes WRONG
That was me :-) Years ago indeed.
Yes, it still has to be done, the projections were not worked on for a
The projections themselves are ported from PROJ4 and basically safe to
use indeed (with no guarantee as usual in open source). I did make a lot
of unit tests, projecting forward and backward, and checking the
results. During this I found about five errors which I reported to PROJ4
and to Gerald Evenden, and which were quickly fixed by them. So we cover
some tests which were never done before ;-)
Altitude is not yet supported in the projections. Altitude/Z can be part
of the point, but it is not changed when projecting a point.
About latlon.h, tmerc.h, do you mean latlong.hpp? Probably yes, and
tmerc.hpp. I don't know by head how to do this, basically it follows
PROJ4 and their documentation is the best starting point. So I point you
to that first http://trac.osgeo.org/proj/
> Thank you for all of your help with this.
You are welcome.
Geometry list run by mateusz at loskot.net