Package uk.ac.rdg.resc.edal.grid
Class AbstractCurvilinearGrid
- java.lang.Object
-
- uk.ac.rdg.resc.edal.grid.AbstractTransformedGrid
-
- uk.ac.rdg.resc.edal.grid.AbstractCurvilinearGrid
-
- All Implemented Interfaces:
Serializable
,DiscreteDomain<HorizontalPosition,GridCell2D>
,DiscreteHorizontalDomain<GridCell2D>
,Domain<HorizontalPosition>
,HorizontalDomain
,HorizontalGrid
- Direct Known Subclasses:
LookUpTableGrid
public abstract class AbstractCurvilinearGrid extends AbstractTransformedGrid
Partial implementation of aHorizontalGrid
that is based upon a curvilinear coordinate system (i.e. one which is defined by explicitly specifying the latitude and longitude coordinates of each grid point.- Author:
- Guy Griffiths, Jon Blower
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CurvilinearCoords
curvCoords
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCurvilinearGrid(CurvilinearCoords curvCoords)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(HorizontalPosition position)
boolean
equals(Object obj)
BoundingBox
getBoundingBox()
Returns the bounding box of the domain in the domain's own coordinate reference system.Array2D<GridCell2D>
getDomainObjects()
Returns anArray
of domain objects that comprise this domain.org.opengis.metadata.extent.GeographicBoundingBox
getGeographicBoundingBox()
Returns the bounding box of the domain in WGS84 latitude-longitude coordinates.int
getXSize()
int
getYSize()
int
hashCode()
long
size()
Returns the size of this domain.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 uk.ac.rdg.resc.edal.grid.AbstractTransformedGrid
getCoordinateReferenceSystem
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.ac.rdg.resc.edal.grid.HorizontalGrid
findIndexOf
-
-
-
-
Field Detail
-
curvCoords
protected final CurvilinearCoords curvCoords
-
-
Constructor Detail
-
AbstractCurvilinearGrid
protected AbstractCurvilinearGrid(CurvilinearCoords curvCoords)
-
-
Method Detail
-
transformNativeHeadingToWgs84
public 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).- Specified by:
transformNativeHeadingToWgs84
in classAbstractTransformedGrid
- 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
-
getDomainObjects
public Array2D<GridCell2D> getDomainObjects()
Description copied from interface:DiscreteDomain
Returns anArray
of domain objects that comprise this domain.
-
contains
public boolean contains(HorizontalPosition position)
- Returns:
- true if the given position is contained within this domain.
-
getBoundingBox
public BoundingBox getBoundingBox()
Description copied from interface:HorizontalDomain
Returns the bounding box of the domain in the domain's own coordinate reference system. For domains which do not have a native co-ordinate reference system this may return aBoundingBox
in a different CRS. Consequently thisBoundingBox
is not guaranteed to be a tight bound around the domain.
-
getGeographicBoundingBox
public org.opengis.metadata.extent.GeographicBoundingBox getGeographicBoundingBox()
Description copied from interface:HorizontalDomain
Returns the bounding box of the domain in WGS84 latitude-longitude coordinates.
-
getXSize
public int getXSize()
- Returns:
- The size of the x-axis
-
getYSize
public int getYSize()
- Returns:
- The size of the y-axis
-
size
public long size()
Description copied from interface:HorizontalGrid
Returns the size of this domain. Equivalent togetXSize() * getYSize()
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceHorizontalGrid
- Overrides:
hashCode
in classObject
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceHorizontalGrid
- Overrides:
equals
in classObject
-
-