Antonio Caccese a écrit :
i had calculated the distance between two points by the
getOrthodromicDistance() method.
The return value of this method is a double.
How can i transform it in its meters, kilometers, miles and feet value.
// To be computed only once for ever for a given GeodeticCalculator
Unit sourceUnit = geodeticCalculator.getEllipsoid().getAxisUnit();
Unit targetUnit = SI.KILO(SI.METER);
Converter c = sourceUnit.getConverterTo(targetUnit);
// To apply after each distance calculation
double km = c.convert(theDistance);
Martin.
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users