Package uk.ac.rdg.resc.edal.grid
Class AbstractTransformedGrid
- java.lang.Object
-
- uk.ac.rdg.resc.edal.grid.AbstractTransformedGrid
-
- All Implemented Interfaces:
Serializable
,DiscreteDomain<HorizontalPosition,GridCell2D>
,DiscreteHorizontalDomain<GridCell2D>
,Domain<HorizontalPosition>
,HorizontalDomain
,HorizontalGrid
- Direct Known Subclasses:
AbstractCurvilinearGrid
,CdmTransformedGrid
public abstract class AbstractTransformedGrid extends Object implements HorizontalGrid
This is an abstract implementation of aHorizontalGrid
for which there exists a transformation to convert WGS84 to the native CRS. This transformation is invisible externally - i.e.getCoordinateReferenceSystem()
will returnDefaultGeographicCRS#WGS84
and all operations behave as though this is the co-ordinate reference system. However, this class also exposes the methodtransformNativeHeadingToWgs84(double, double, double, double)
so that vector transforms can be handled.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractTransformedGrid()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.opengis.referencing.crs.CoordinateReferenceSystem
getCoordinateReferenceSystem()
Always returnsDefaultGeographicCRS#WGS84
.abstract double
transformNativeHeadingToWgs84(double xComp, double yComp, double lon, double lat)
Transforms a heading in native grid co-ordinates (degrees clockwise from positive y-direction) into a heading in WGS84 (degrees clockwise from north).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.ac.rdg.resc.edal.domain.HorizontalDomain
getBoundingBox, getGeographicBoundingBox
-
Methods inherited from interface uk.ac.rdg.resc.edal.grid.HorizontalGrid
equals, findIndexOf, getDomainObjects, getXSize, getYSize, hashCode, size
-
-
-
-
Method Detail
-
transformNativeHeadingToWgs84
public abstract double transformNativeHeadingToWgs84(double xComp, double yComp, double lon, double lat)
Transforms a heading in native grid co-ordinates (degrees clockwise from positive y-direction) into a heading in WGS84 (degrees clockwise from north).- Parameters:
xComp
- The x-component of the headingyComp
- The y-component of the headinglon
- The longitude of the given componentslat
- The latitude of the given components- Returns:
- The transformed heading
-
getCoordinateReferenceSystem
public final org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
Always returnsDefaultGeographicCRS#WGS84
. Transformations between native CRS and WGS84 are done behind the scenes- Specified by:
getCoordinateReferenceSystem
in interfaceHorizontalDomain
-
-