Le lundi 17 septembre 2007 à 14:24 -0700, Jody Garnett a écrit :
> > Is it possible to use geotools to calculate the compass heading from one
> > point to another? Thanks, David Robison
> >
> It is possible, transform your two locations into
> DefaultGeographicCRS.WSG84 and then calculate the angle between them
> (you may have some fun around the dateline.
We can not calculate that easily in a geographic CRS. We could calculate
that using atan2(y,x) in a conformal projection (as opposed to an "equal
area" projection), but this work only locally.
Take a look a org.geotools.referencing.GeodeticCalculator class; it
should do the work you are looking for.
Martin
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users