|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.cs.GeodeticCalculator
GeodeticCalculator
.
Performs geodetic calculations on an ellipsoid. This class encapsulate a generic ellipsoid and calculate the following properties:
GeodeticCalculator
for each thread even
if the computations are performed with the same ellipsoid.
Constructor Summary | |
GeodeticCalculator()
Deprecated. Constructs a new geodetic calculator associated with the WGS84 ellipsoid. |
|
GeodeticCalculator(Ellipsoid ellipsoid)
Deprecated. Constructs a new geodetic calculator associated with the specified ellipsoid. |
Method Summary | |
java.awt.geom.Point2D |
getAnchorPoint()
Deprecated. Returns the anchor point. |
double |
getAzimuth()
Deprecated. Returns the azimuth. |
java.awt.geom.Point2D |
getDestinationPoint()
Deprecated. Returns the destination point. |
Ellipsoid |
getEllipsoid()
Deprecated. Return the referenced ellipsoid. |
java.awt.Shape |
getGeodeticCurve()
Deprecated. Calculates the geodetic curve between two points in the referenced ellipsoid. |
java.awt.Shape |
getGeodeticCurve(int numberOfPoints)
Deprecated. Calculates the geodetic curve between two points in the referenced ellipsoid. |
double |
getMeridianArcLength(double latitude1,
double latitude2)
Deprecated. Calculate the meridian arc length between two points in the same meridian in the referenced ellipsoid. |
double |
getOrthodromicDistance()
Deprecated. Returns the orthodromic distance. |
void |
setAnchorPoint(double longitude,
double latitude)
Deprecated. Set the anchor point. |
void |
setAnchorPoint(java.awt.geom.Point2D point)
Deprecated. Set the anchor point. |
void |
setDestinationPoint(double longitude,
double latitude)
Deprecated. Set the destination point. |
void |
setDestinationPoint(java.awt.geom.Point2D point)
Deprecated. Set the destination point. |
void |
setDirection(double azimuth,
double distance)
Deprecated. Set the azimuth and the distance from the anchor point. |
static com.vividsolutions.jts.geom.Geometry |
shapeToGeometry(java.awt.Shape shape,
com.vividsolutions.jts.geom.GeometryFactory factory)
Deprecated. Convert an arbitrary Java2D shape into a JTS geometry. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GeodeticCalculator()
public GeodeticCalculator(Ellipsoid ellipsoid)
ellipsoid
- The reference to the ellipsoid onto which calculates distances and azimuths.Method Detail |
public Ellipsoid getEllipsoid()
public void setAnchorPoint(double longitude, double latitude) throws java.lang.IllegalArgumentException
longitude
- The longitude in degrees between -180 and +180?latitude
- The latitude in degrees between -90 and +90?
java.lang.IllegalArgumentException
- if the longitude or the latitude is out of bounds.public void setAnchorPoint(java.awt.geom.Point2D point) throws java.lang.IllegalArgumentException
setAnchorPoint(x,y)
.
point
- The anchor point.
java.lang.IllegalArgumentException
- if the longitude or the latitude is out of bounds.public java.awt.geom.Point2D getAnchorPoint()
public void setDestinationPoint(double longitude, double latitude) throws java.lang.IllegalArgumentException
getAzimuth()
or
getOrthodromicDistance()
are invoked.
longitude
- The longitude in degrees between -180 and +180?latitude
- The latgitude in degrees between -90 and +90?
java.lang.IllegalArgumentException
- if the longitude or the latitude is out of bounds.public void setDestinationPoint(java.awt.geom.Point2D point) throws java.lang.IllegalArgumentException
setDestinationPoint(x,y)
.
point
- The destination point.
java.lang.IllegalArgumentException
- if the longitude or the latitude is out of bounds.public java.awt.geom.Point2D getDestinationPoint() throws java.lang.IllegalStateException
setDestinationPoint(...)
method, except if
setDirection(...)
has been
invoked after. In this later case, the destination point will be computed from the
anchor point to the azimuth and distance specified.
java.lang.IllegalStateException
- if the azimuth and the distance have not been set.public void setDirection(double azimuth, double distance) throws java.lang.IllegalArgumentException
getDestinationPoint()
is invoked.
azimuth
- The azimuth in degrees from -180? to 180?.distance
- The orthodromic distance in the same units as the
ellipsoid axis.
java.lang.IllegalArgumentException
- if the azimuth or the distance is out of bounds.getAzimuth()
,
getOrthodromicDistance()
public double getAzimuth() throws java.lang.IllegalStateException
setDirection(azimuth,distance)
,
except if
setDestinationPoint(...)
has been invoked after. In this later case, the azimuth will be computed from the
anchor point to the destination point.
java.lang.IllegalStateException
- if the destination point has not been set.public double getOrthodromicDistance() throws java.lang.IllegalStateException
setDirection(azimuth,distance)
,
except if
setDestinationPoint(...)
has been invoked after. In this later case, the distance will be computed from the
anchor point to the destination point.
java.lang.IllegalStateException
- if the destination point has not been set.public double getMeridianArcLength(double latitude1, double latitude2)
latitude1
- The latitude of the first point (in degrees).latitude2
- The latitude of the second point (in degrees).
public java.awt.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 java.awt.Shape getGeodeticCurve()
public static com.vividsolutions.jts.geom.Geometry shapeToGeometry(java.awt.Shape shape, com.vividsolutions.jts.geom.GeometryFactory factory)
LineString
, LinearRing
or MultiLineString
.
shape
- The Java2D shape to create.factory
- The JTS factory to use for creating geometry.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |