Package noaa.coastwatch.util.trans
Class DataProjection
java.lang.Object
noaa.coastwatch.util.MetadataContainer
noaa.coastwatch.util.trans.EarthTransform
noaa.coastwatch.util.trans.EarthTransform2D
noaa.coastwatch.util.trans.DataProjection
- All Implemented Interfaces:
Cloneable
The
DataProjection
class implements earth transform
calculations for data coordinates with explicit latitude and
longitude data. The only possible operation is translation from
data coordinates to geographic coordinates -- the reverse is not
implemented.- Since:
- 3.1.0
- Author:
- Peter Hollemans
-
Field Summary
Fields inherited from class noaa.coastwatch.util.trans.EarthTransform
boundaryHandler, dims
-
Constructor Summary
ConstructorDescriptionDataProjection
(DataVariable lat, DataVariable lon) Constructs a data projection from the specified latitude and longitude data. -
Method Summary
Modifier and TypeMethodDescriptiondescribe()
Gets a string describing the earth transform type.boolean
Compares the specified object with this data projection for equality.getLat()
Gets the latitude variable used in this projection.getLon()
Gets the longitude variable used in this projection.boolean
Determines if this transform is invertible.protected void
transformImpl
(DataLocation dataLoc, EarthLocation earthLoc) Implements the data to geographic transform.protected void
transformImpl
(EarthLocation earthLoc, DataLocation dataLoc) Implements the geographic to data transform.Methods inherited from class noaa.coastwatch.util.trans.EarthTransform2D
get2DVersion, getBoundingBox, getWorldAxes, isOrientable, main, setPointTransform, transformToPoint
Methods inherited from class noaa.coastwatch.util.trans.EarthTransform
clone, distance, getBoundaryHandler, getDatum, getDimensions, getResolution, getSpheroid, getSpheroid, getSubset, transform, transform, transform, transform
Methods inherited from class noaa.coastwatch.util.MetadataContainer
getMetadataMap
-
Field Details
-
DESCRIPTION
Projection description string.- See Also:
-
-
Constructor Details
-
DataProjection
Constructs a data projection from the specified latitude and longitude data.- Parameters:
lat
- a data variable containing latitude data.lon
- a data variable containing longitude data.
-
-
Method Details
-
getLat
Gets the latitude variable used in this projection. -
getLon
Gets the longitude variable used in this projection. -
describe
Description copied from class:EarthTransform
Gets a string describing the earth transform type.- Specified by:
describe
in classEarthTransform
-
transformImpl
Description copied from class:EarthTransform
Implements the data to geographic transform.- Specified by:
transformImpl
in classEarthTransform
- See Also:
-
transformImpl
Description copied from class:EarthTransform
Implements the geographic to data transform.- Specified by:
transformImpl
in classEarthTransform
- See Also:
-
isInvertible
public boolean isInvertible()Description copied from class:EarthTransform
Determines if this transform is invertible. All transforms should translate from data location to geographic location. But to be invertible, the transform must also translate from geographic location back to data location. This method returns true unless overridden by the child class.- Overrides:
isInvertible
in classEarthTransform
- Returns:
- true if this transform is invertible or false if not.
-
equals
Compares the specified object with this data projection for equality. The latitudes and longitudes of the two data projections are compared value by value.
-