

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
Object GeodeticCalculator
public class GeodeticCalculator
Performs geodetic calculations on an ellipsoid. This class encapsulates a generic ellipsoid and calculates the following properties:
The calculation use the following informations:
Note: This class is not threadsafe. If geodetic calculations are needed in a multithreads
environment, create one distinct instance of GeodeticCalculator
for each thread.
Constructor Summary  

GeodeticCalculator()
Constructs a new geodetic calculator associated with the WGS84 ellipsoid. 

GeodeticCalculator(CoordinateReferenceSystem crs)
Constructs a new geodetic calculator expecting coordinates in the supplied CRS. 

GeodeticCalculator(Ellipsoid ellipsoid)
Constructs a new geodetic calculator associated with the specified ellipsoid. 
Method Summary  

double 
getAzimuth()
Returns the azimuth. 
CoordinateReferenceSystem 
getCoordinateReferenceSystem()
Returns the coordinate reference system for all methods working on Position objects. 
Point2D 
getDestinationGeographicPoint()
Returns the destination point. 
DirectPosition 
getDestinationPosition()
Returns the destination position in user coordinates, which doesn't need to be geographic. 
Ellipsoid 
getEllipsoid()
Returns the referenced ellipsoid. 
Shape 
getGeodeticCurve()
Calculates the geodetic curve between two points in the referenced ellipsoid. 
Shape 
getGeodeticCurve(int numberOfPoints)
Calculates the geodetic curve between two points in the referenced ellipsoid. 
GeographicCRS 
getGeographicCRS()
Returns the geographic coordinate reference system for all methods working on Point2D objects. 
double 
getMeridianArcLength(double latitude1,
double latitude2)
Calculates the meridian arc length between two points in the same meridian in the referenced ellipsoid. 
double 
getOrthodromicDistance()
Returns the orthodromic distance (expressed in meters). 
Point2D 
getStartingGeographicPoint()
Returns the starting point in geographic coordinates. 
DirectPosition 
getStartingPosition()
Returns the starting position in user coordinates, which doesn't need to be geographic. 
void 
setDestinationGeographicPoint(double longitude,
double latitude)
Set the destination point in geographic coordinates. 
void 
setDestinationGeographicPoint(Point2D point)
Set the destination point in geographic coordinates. 
void 
setDestinationPosition(Position position)
Set the destination position in user coordinates, which doesn't need to be geographic. 
void 
setDirection(double azimuth,
double distance)
Set the azimuth and the distance from the starting point. 
void 
setStartingGeographicPoint(double longitude,
double latitude)
Set the starting point in geographic coordinates. 
void 
setStartingGeographicPoint(Point2D point)
Set the starting point in geographic coordinates. 
void 
setStartingPosition(Position position)
Set the starting position in user coordinates, which doesn't need to be geographic. 
String 
toString()
Returns a string representation of the current state of this calculator. 
Methods inherited from class Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
Constructor Detail 

public GeodeticCalculator()
public GeodeticCalculator(Ellipsoid ellipsoid)
ellipsoid
 The ellipsoid onto which calculates distances and azimuths.public GeodeticCalculator(CoordinateReferenceSystem crs)
crs
 The reference system for the Position
objects.Method Detail 

public CoordinateReferenceSystem getCoordinateReferenceSystem()
Position
objects.
This is the CRS specified at construction time.
Position
s.public GeographicCRS getGeographicCRS()
Point2D
objects. This is inferred from the CRS specified at
construction time.
Point2D
s.public Ellipsoid getEllipsoid()
public void setStartingGeographicPoint(double longitude, double latitude) throws IllegalArgumentException
longitude
 The longitude in decimal degrees between 180 and +180°latitude
 The latitude in decimal degrees between 90 and +90°
IllegalArgumentException
 if the longitude or the latitude is out of bounds.public void setStartingGeographicPoint(Point2D point) throws IllegalArgumentException
setStartingGeographicPoint(x,y)
.
point
 The starting point.
IllegalArgumentException
 if the longitude or the latitude is out of bounds.public void setStartingPosition(Position position) throws TransformException
position
 The position in user coordinate reference system.
TransformException
 if the position can't be transformed.public Point2D getStartingGeographicPoint()
public DirectPosition getStartingPosition() throws TransformException
TransformException
 if the position can't be transformed to user coordinates.public void setDestinationGeographicPoint(double longitude, double latitude) throws IllegalArgumentException
getAzimuth()
or getOrthodromicDistance()
are invoked.
longitude
 The longitude in decimal degrees between 180 and +180°latitude
 The latgitude in decimal degrees between 90 and +90°
IllegalArgumentException
 if the longitude or the latitude is out of bounds.public void setDestinationGeographicPoint(Point2D point) throws IllegalArgumentException
setDestinationGeographicPoint(x,y)
.
point
 The destination point.
IllegalArgumentException
 if the longitude or the latitude is out of bounds.public void setDestinationPosition(Position position) throws TransformException
position
 The position in user coordinate reference system.
TransformException
 if the position can't be transformed.public Point2D getDestinationGeographicPoint() throws IllegalStateException
setDestinationGeographicPoint(...)
method, except if
setDirection(...)
has been
invoked after. In this later case, the destination point will be computed from the
starting point to the azimuth and distance
specified.
IllegalStateException
 if the azimuth and the distance have not been set.public DirectPosition getDestinationPosition() throws TransformException
TransformException
 if the position can't be transformed to user coordinates.public void setDirection(double azimuth, double distance) throws IllegalArgumentException
getDestinationGeographicPoint()
is invoked.
azimuth
 The azimuth in decimal degrees from 180° to 180°.distance
 The orthodromic distance in the same units as the
ellipsoid axis (meters by default)
IllegalArgumentException
 if the azimuth or the distance is out of bounds.getAzimuth()
,
getOrthodromicDistance()
public double getAzimuth() throws IllegalStateException
setDirection(azimuth,distance)
,
except if setDestinationGeographicPoint(...)
has been invoked after. In this later case, the
azimuth will be computed from the starting point
to the destination point.
IllegalStateException
 if the destination point has not been set.public double getOrthodromicDistance() throws IllegalStateException
setDirection(azimuth,distance)
,
except if setDestinationGeographicPoint(...)
has been invoked after. In this later case, the
distance will be computed from the starting point
to the destination point.
IllegalStateException
 if the destination point has not been set.public double getMeridianArcLength(double latitude1, double latitude2)
latitude1
 The latitude of the first point (in decimal degrees).latitude2
 The latitude of the second point (in decimal degrees).
public Shape getGeodeticCurve(int numberOfPoints)
numberOfPoints
 The number of vertex in the geodetic curve.
NOTE: This argument is only a hint and may be ignored
in future version (if we compute a real curve rather than a list of line
segments).
public Shape getGeodeticCurve()
public String toString()
toString
in class Object


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 