Torgue ha scritto:
> Wikipedia:
> For example, moving clockwise on a 360° degree circle, a point due east
> would have an azimuth of 90°, south 180°, and west 270°.
> 
> Example for a south direction:
> 
>               GeodeticCalculator calc = new GeodeticCalculator();
>               calc.setStartingGeographicPoint(0,0);
>               calc.setDestinationGeographicPoint(-1,0);
> 
>               double azimuth = calc.getAzimuth();
> 
> Result: -90.0 but should be 180

The result is correct. The API is clear:

/**
      * Set the destination point in geographic coordinates. The azimuth 
and distance values
      * will be updated as a side effect of this call. They will be 
recomputed the next time
      * {...@link #getAzimuth()} or {...@link #getOrthodromicDistance()} are 
invoked.
      *
      * @param  longitude The longitude in decimal degrees between -180 
and +180°
      * @param  latitude  The latgitude in decimal degrees between  -90 
and  +90°
      * @throws IllegalArgumentException if the longitude or the 
latitude is out of bounds.
      *
      * @since 2.3
      */
     public void setDestinationGeographicPoint(double longitude, double 
latitude)
             throws IllegalArgumentException

(-1, 0) is west of (0,0)

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to