Class Rotator
(0.0, 0.0) of the coordinate system.
If the coordinate which shall become the north pole of the new coordinate system is known the latitude value given into the
constructor must be changed. Instead of providing directly the latitude value, it must be 90 - latitude.- Version:
- $Revision$ $Date$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Point2DcalculateCenter(double[][] data, int lonIndex, int latIndex) doublegetAlpha()Returns the x-axis rotation angle.doublegetLat()Returns the central latitude of rotation.doublegetLon()Returns the central longitude of rotation.voidtransform(double[] lons, double[] lats) Transforms a given set of geographical longitudes and latitudes into the rotated coordinate system.voidTransforms a given geographical point into the rotated coordinate system.voidtransformInversely(double[] lons, double[] lats) Transforms a given set of geographical longitudes and latitudes back into the unrotated coordinate system.voidtransformInversely(Point2D point) Transforms a given geographical point back into the unrotated coordinate system.
-
Constructor Details
-
Rotator
public Rotator(double lon, double lat) Constructs a new rotation. In the rotated system, the point defined by the (lon, lat) parameters is located at the origin, i.e. has the geographical coordinates (0, 0).The new rotation is composed of a clockwise rotation about the z-axis (which corresponds to S-N direction) and a counter-clockwise rotation about the y-axis (which corresponds to W-E direction).
- Parameters:
lon- the geographical longitude of the point becoming the new origin.lat- the geographical latitude of the point becoming the new origin.
-
Rotator
public Rotator(double lon, double lat, double alpha) Constructs a new rotation. In the rotated system, the point defined by the (lon, lat) parameters is located at the origin, i.e. has the geographical coordinates (0, 0).The new rotation is composed of a clockwise rotation about the z-axis (which corresponds to S-N direction), a counter-clockwise rotation about the y-axis (which corresponds to W-E direction), and a counter clockwise rotation about the x-axis by the angle alpha.
- Parameters:
lon- the geographical longitude of the point becoming the new origin.lat- the geographical latitude of the point becoming the new origin.alpha- the rotation angle (degrees) corresponding to the x-axis.
-
Rotator
Constructs a new rotation. In the rotated system, the point defined by the (lon, lat) parameters is located at the origin, i.e. has the geographical coordinates (0, 0).The new rotation is composed of a clockwise rotation about the z-axis (which corresponds to S-N direction) and a counter-clockwise rotation about the y-axis (which corresponds to W-E direction).
- Parameters:
point- the point becoming the new origin, the x and y components of which define, respectively, the geographical longitude and latitude.
-
Rotator
Constructs a new rotation. In the rotated system, the point defined by the (lon, lat) parameters is located at the origin, i.e. has the geographical coordinates (0, 0).The new rotation is composed of a clockwise rotation about the z-axis (which corresponds to S-N direction), a counter-clockwise rotation about the y-axis (which corresponds to W-E direction), and a counter clockwise rotation about the x-axis by the angle alpha.
- Parameters:
point- the point becoming the new origin, the x and y components of which define, respectively, the geographical longitude and latitude.alpha- the rotation angle (degrees) corresponding to the x-axis.
-
-
Method Details
-
getLon
public double getLon()Returns the central longitude of rotation.- Returns:
- the central longitude of rotation.
-
getLat
public double getLat()Returns the central latitude of rotation.- Returns:
- the central latitude of rotation.
-
getAlpha
public double getAlpha()Returns the x-axis rotation angle.- Returns:
- the x-axis rotation angle.
-
calculateCenter
-
transform
Transforms a given geographical point into the rotated coordinate system.- Parameters:
point- the point.
-
transform
public void transform(double[] lons, double[] lats) Transforms a given set of geographical longitudes and latitudes into the rotated coordinate system.- Parameters:
lons- the geographical longitudes.lats- the geographical latitudes.
-
transformInversely
Transforms a given geographical point back into the unrotated coordinate system.- Parameters:
point- the point.
-
transformInversely
public void transformInversely(double[] lons, double[] lats) Transforms a given set of geographical longitudes and latitudes back into the unrotated coordinate system.- Parameters:
lons- the geographical longitudes.lats- the geographical latitudes.
-