transform longitude latitude into meters
- by Sponge
I need a function that maps gps positions to x/y values like this:
getXYpos(GeoPoint relativeNullPoint, GeoPoint p){
deltaLatitude=p.latitude-relativeNullPoint.latitude;
deltaLongitude=p.longitude-relativeNullPoint.longitude;
...
resultX=latitude (or west to east) distance in meters from p to relativeNullPoint
resultY=longitude (or south to north) distance in meters from p to relativeNullPoint
}
i have seen some implementations of "distance of two geoPoints" but they all just calculate the air-line distance.
i think the deltaLongitude can be transformed into meters directly but the deltaLatitude depends in the Longitude. does anyone know how this problem can be solved?