Hello michael. In this example, i have two coordinate.

Coordinate 1 = (-8.3833333333, 43.3666666667, NaN)

Coordiante 2 = (-6.9666666667, 38.8833333333, NaN)

Calculate the distance I use the GeodeticCalculator:

GeodeticCalculator calculator = new 
GeodeticCalculator(DefaultGeographicCRS.WGS84);
calculator.setStartingGeographicPoint(punto1.x, punto1.y);
calculator.setDestinationGeographicPoint(punto2.x,      punto2.y);
double valueDistance = calculator.getOrthodromicDistance();

the result distance is 511894.631746389

this value is degree,meters,radians.....
what measure is this value?

Many thanks.


-----Mensaje original-----
De: Michael Bedward [mailto:[email protected]] 
Enviado el: miƩrcoles, 03 de junio de 2009 9:31
Para: Preciado Venero, Abel; geotools users
Asunto: Re: [Geotools-gt2-users] method distante to class coordinate (jts)

Hi Abel

I'm not sure if you're working with the Coordinate class form the JTS
library or the Coordinate class from the GeoTools unsupported/geometry
module.  As it happens, the answer is the same for both...

The distance will be in whatever units you are working with :-)
Please note however that Coordinate assumes Cartesian (planar)
coordinates.  So the distance method, which does uses simple
Pythagorus calculation, will return inaccurate results if you are
actually working with ellipsoidal coordinates such as lat-longs.  In
the latter case we will send you back to GeodeticCalculator again !

Hope this helps,

Michael

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to