public final class Rotator extends Object
(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
.Constructor and Description |
---|
Rotator(double lon,
double lat)
Constructs a new rotation.
|
Rotator(double lon,
double lat,
double alpha)
Constructs a new rotation.
|
Rotator(Point2D point)
Constructs a new rotation.
|
Rotator(Point2D point,
double alpha)
Constructs a new rotation.
|
Modifier and Type | Method and Description |
---|---|
static Point2D |
calculateCenter(double[][] data,
int lonIndex,
int latIndex) |
double |
getAlpha()
Returns the x-axis rotation angle.
|
double |
getLat()
Returns the central latitude of rotation.
|
double |
getLon()
Returns the central longitude of rotation.
|
void |
transform(double[] lons,
double[] lats)
Transforms a given set of geographical longitudes and latitudes
into the rotated coordinate system.
|
void |
transform(Point2D point)
Transforms a given geographical point into the rotated coordinate
system.
|
void |
transformInversely(double[] lons,
double[] lats)
Transforms a given set of geographical longitudes and latitudes
back into the unrotated coordinate system.
|
void |
transformInversely(Point2D point)
Transforms a given geographical point back into the unrotated
coordinate system.
|
public Rotator(double lon, double lat)
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).
lon
- the geographical longitude of the point becoming the new
origin.lat
- the geographical latitude of the point becoming the new
origin.public Rotator(double lon, double lat, double alpha)
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.
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.public Rotator(Point2D point)
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).
point
- the point becoming the new origin, the x and y components
of which define, respectively, the geographical longitude
and latitude.public Rotator(Point2D point, double alpha)
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.
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.public double getLon()
public double getLat()
public double getAlpha()
public static Point2D calculateCenter(double[][] data, int lonIndex, int latIndex)
public void transform(Point2D point)
point
- the point.public void transform(double[] lons, double[] lats)
lons
- the geographical longitudes.lats
- the geographical latitudes.public void transformInversely(Point2D point)
point
- the point.public void transformInversely(double[] lons, double[] lats)
lons
- the geographical longitudes.lats
- the geographical latitudes.Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.