
30 Jan
2013
30 Jan
'13
7:58 a.m.
GerdP wrote
Hi,
what is the correct way to convert the value returned by Coord.distanceInDegreesSquared() into map units?
A simple code like this seems not to work: double distSq = co1.distanceInDegreesSquared(co2); int mapUnits = Utils.toMapUnit(Math.sqrt(distSq));
Gerd
OK, I learned that I have to know the latitude to do the calculation. In splitter, this (simplified) formula is used to calculate the width of a bbox: factor = Math.cos(Math.toRadians(Utils.toDegrees(lat))); double width = (maxLon-minLon) * factor Gerd -- View this message in context: http://gis.19327.n5.nabble.com/how-to-convert-Coord-distanceInDegreesSquared... Sent from the Mkgmap Development mailing list archive at Nabble.com.