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 aHorizontalGridthat 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 CurvilinearCoordscurvCoords
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractCurvilinearGrid(CurvilinearCoords curvCoords)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(HorizontalPosition position)booleanequals(Object obj)BoundingBoxgetBoundingBox()Returns the bounding box of the domain in the domain's own coordinate reference system.Array2D<GridCell2D>getDomainObjects()Returns anArrayof domain objects that comprise this domain.org.opengis.metadata.extent.GeographicBoundingBoxgetGeographicBoundingBox()Returns the bounding box of the domain in WGS84 latitude-longitude coordinates.intgetXSize()intgetYSize()inthashCode()longsize()Returns the size of this domain.doubletransformNativeHeadingToWgs84(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:
transformNativeHeadingToWgs84in 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:DiscreteDomainReturns anArrayof 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:HorizontalDomainReturns 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 aBoundingBoxin a different CRS. Consequently thisBoundingBoxis not guaranteed to be a tight bound around the domain.
-
getGeographicBoundingBox
public org.opengis.metadata.extent.GeographicBoundingBox getGeographicBoundingBox()
Description copied from interface:HorizontalDomainReturns 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:HorizontalGridReturns the size of this domain. Equivalent togetXSize() * getYSize()
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceHorizontalGrid- Overrides:
hashCodein classObject
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceHorizontalGrid- Overrides:
equalsin classObject
-
-