public abstract class EarthTransform extends MetadataContainer implements SpheroidConstants
Modifier and Type | Field and Description |
---|---|
protected int[] |
dims
Data location dimensions.
|
AIRY, AUS_NAT, BESSEL, CLARKE1866, CLARKE1880, EVEREST, GRS1980, HOUGH, INT1909, INT1967, KRASS, MAX_SPHEROIDS, MERCURY1960, MOD_AIRY, MOD_EVEREST, MOD_MER1968, SE_ASIA, SPHERE, SPHEROID_INV_FLAT, SPHEROID_NAMES, SPHEROID_SEMI_MAJOR, SPHEROID_SEMI_MINOR, STD_RADIUS, WGS66, WGS72
Constructor and Description |
---|
EarthTransform() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object.
|
abstract java.lang.String |
describe()
Gets a string describing the earth transform type.
|
double |
distance(DataLocation loc1,
DataLocation loc2)
Calculates the distance between two data locations.
|
abstract EarthTransform2D |
get2DVersion()
Gets a version of this transform that can be used with 2D data
locations.
|
Datum |
getDatum()
Gets the transform datum.
|
int[] |
getDimensions()
Gets the transform data location dimensions.
|
double[] |
getResolution(DataLocation loc)
Gets the projection resolution at the specified location.
|
static int |
getSpheroid(double semiMajor,
double semiMinor)
Gets the spheroid that most closely resembles the specified
parameters.
|
static int |
getSpheroid(java.lang.String name)
Gets the spheroid that matches the specified name.
|
EarthTransform |
getSubset(DataLocation newOrigin,
int[] newDims)
Creates and returns a new subset transform.
|
EarthLocation |
transform(DataLocation dataLoc)
Converts data coordinates to geographic coordinates.
|
EarthLocation |
transform(DataLocation dataLoc,
EarthLocation earthLoc)
Converts data coordinates to geographic coordinates.
|
DataLocation |
transform(EarthLocation earthLoc)
Converts geographic coordinates to data coordinates.
|
DataLocation |
transform(EarthLocation earthLoc,
DataLocation dataLoc)
Converts geographic coordinates to data coordinates.
|
protected abstract void |
transformImpl(DataLocation dataLoc,
EarthLocation earthLoc)
Implements the data to geographic transform.
|
protected abstract void |
transformImpl(EarthLocation earthLoc,
DataLocation dataLoc)
Implements the geographic to data transform.
|
getMetadataMap
public abstract EarthTransform2D get2DVersion()
public Datum getDatum()
public EarthLocation transform(DataLocation dataLoc)
dataLoc
- the data location.Double.NaN
if no conversion is possible.transform(DataLocation,EarthLocation)
public EarthLocation transform(DataLocation dataLoc, EarthLocation earthLoc)
dataLoc
- the data location.earthLoc
- the earth location or null. If null, an object
is created and returned. If non-null, the object is simply
modified.Double.NaN
if no conversion is possible.transform(DataLocation)
protected abstract void transformImpl(DataLocation dataLoc, EarthLocation earthLoc)
transform(DataLocation,EarthLocation)
public DataLocation transform(EarthLocation earthLoc)
earthLoc
- the earth location.Double.NaN
if no conversion is possible.transform(EarthLocation,DataLocation)
public DataLocation transform(EarthLocation earthLoc, DataLocation dataLoc)
earthLoc
- the earth location.dataLoc
- the data location or null. If null, an object
is created and returned. If non-null, the object is simply
modified.Double.NaN
if no conversion is possible.transform(EarthLocation)
protected abstract void transformImpl(EarthLocation earthLoc, DataLocation dataLoc)
transform(EarthLocation,DataLocation)
public abstract java.lang.String describe()
public double distance(DataLocation loc1, DataLocation loc2)
loc1
- the first data coordinate.loc2
- the second data coordinate.EarthLocation.distance(double, double, double, double)
public EarthTransform getSubset(DataLocation newOrigin, int[] newDims)
newOrigin
- the new data location origin.newDims
- the new data location dimensions.java.lang.UnsupportedOperationException
- if the underlying Earth
transform class does not support the creation of subset
transforms.public double[] getResolution(DataLocation loc)
loc
- the data location at which to calculate the
resolution.public int[] getDimensions()
public java.lang.Object clone()
clone
in class MetadataContainer
public static int getSpheroid(double semiMajor, double semiMinor)
semiMajor
- the spheroid semi-major axis in meters.semiMinor
- the spheroid semi-minor axis in meters.public static int getSpheroid(java.lang.String name)
name
- the spheroid name.