Boost logo

Geometry :

Subject: [ggl] point conversion geographic <-> cartesian
From: Krzysztof Czainski (1czajnik)
Date: 2010-11-05 07:25:31


Hello,

I would like to keep a list of points in geographic coordinates, all of
which should lie in the same region (lets say max distance would be 500 km).
I would like to display their positions on the screen, so I need some way to
convert them to cartesian.

So far I found the distance algorithm, which allows me to perform a
conversion to cartesian as follows:
Given points P1(lon1,lat1), P2(lon2,lat2), asuming P1cart=(0,0),
P2cart=(x2?,y2?) can be calculated using the distance algorithm:
x2=distance([lon1,lat1],[lon2,lat1]); y2=distance([lon1,lat1],[lon1,lat2]).

I suspect this is not an efficient conversion, bot that does not consern me
right now.

I also need a conversion the other way - that is:
Given P1(lon1,lat1), P1cart=(0,0) and P2cart(x2,y2), P2=(lon2?,lat2?)
I have not found, how this can be done with bgl

I will apreciate help regarding this problem

Regards,
Kris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20101105/ccc2a1d3/attachment.html


Geometry list run by mateusz at loskot.net