Package uk.ac.rdg.resc.edal.grid
Class RegularGridImpl
- java.lang.Object
-
- uk.ac.rdg.resc.edal.grid.AbstractHorizontalGrid
-
- uk.ac.rdg.resc.edal.grid.RectilinearGridImpl
-
- uk.ac.rdg.resc.edal.grid.RegularGridImpl
-
- All Implemented Interfaces:
Serializable,DiscreteDomain<HorizontalPosition,GridCell2D>,DiscreteHorizontalDomain<GridCell2D>,Domain<HorizontalPosition>,HorizontalDomain,HorizontalGrid,RectilinearGrid,RegularGrid
public class RegularGridImpl extends RectilinearGridImpl implements RegularGrid, Serializable
Immutable implementation of aRegularGrid.- Author:
- Guy, Jon
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class uk.ac.rdg.resc.edal.grid.RectilinearGridImpl
xAxis, yAxis
-
Fields inherited from class uk.ac.rdg.resc.edal.grid.AbstractHorizontalGrid
crs
-
-
Constructor Summary
Constructors Constructor Description RegularGridImpl(double[] bbox, org.opengis.referencing.crs.CoordinateReferenceSystem crs, int width, int height)Constructs a RegularGrid from the given bounding box, with the given width and height.RegularGridImpl(double minx, double miny, double maxx, double maxy, org.opengis.referencing.crs.CoordinateReferenceSystem crs, int width, int height)Constructs a RegularGrid from the given bounding box, with the given width and height.RegularGridImpl(BoundingBox bbox, int width, int height)Constructs a RegularGrid from the given bounding box, with the given width and height.RegularGridImpl(RegularAxis xAxis, RegularAxis yAxis, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RegularAxisgetXAxis()Gets the x axis of the grid.RegularAxisgetYAxis()Gets the y axis of the grid.-
Methods inherited from class uk.ac.rdg.resc.edal.grid.RectilinearGridImpl
contains, equals, findIndexOf, getBoundingBox, getCoordinateReferenceSystem, getDomainObjects, getGeographicBoundingBox, getXSize, getYSize, hashCode, size
-
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.domain.HorizontalDomain
getBoundingBox, getCoordinateReferenceSystem, getGeographicBoundingBox
-
Methods inherited from interface uk.ac.rdg.resc.edal.grid.HorizontalGrid
equals, findIndexOf, getDomainObjects, getXSize, getYSize, hashCode, size
-
-
-
-
Constructor Detail
-
RegularGridImpl
public RegularGridImpl(RegularAxis xAxis, RegularAxis yAxis, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
-
RegularGridImpl
public RegularGridImpl(BoundingBox bbox, int width, int height)
Constructs a RegularGrid from the given bounding box, with the given width and height. Note that the bounding box represents the edges of the grid, whereas grid coordinates represent the centre of the grid points.
The coordinate reference system of the returned grid will be taken from the CRS of the bounding box. If this is null, the names of the axes will be set to "Unknown X axis" and "Unknown Y axis".
- Parameters:
bbox- The bounding box of the gridwidth- the number of grid points in the x directionheight- the number of grid points in the y direction
-
RegularGridImpl
public RegularGridImpl(double[] bbox, org.opengis.referencing.crs.CoordinateReferenceSystem crs, int width, int height)Constructs a RegularGrid from the given bounding box, with the given width and height. Note that the bounding box represents the edges of the grid, whereas grid coordinates represent the centre of the grid points.- Parameters:
bbox- the bounding box, in the form: [minx, miny, maxx, maxy]crs- theCoordinateReferenceSystemof the bounding boxwidth- the number of grid points in the x directionheight- the number of grid points in the y direction
-
RegularGridImpl
public RegularGridImpl(double minx, double miny, double maxx, double maxy, org.opengis.referencing.crs.CoordinateReferenceSystem crs, int width, int height)Constructs a RegularGrid from the given bounding box, with the given width and height. Note that the bounding box represents the edges of the grid, whereas grid coordinates represent the centre of the grid points.- Parameters:
minx- the minimum x value of the bounding boxminy- the minimum y value of the bounding boxmaxx- the maximum x value of the bounding boxmaxy- the maximum y value of the bounding boxcrs- theCoordinateReferenceSystemwidth- the number of grid points in the x-directionheight- the number of grid points in the y-direction
-
-
Method Detail
-
getXAxis
public RegularAxis getXAxis()
Description copied from interface:RectilinearGridGets the x axis of the grid.- Specified by:
getXAxisin interfaceRectilinearGrid- Specified by:
getXAxisin interfaceRegularGrid- Overrides:
getXAxisin classRectilinearGridImpl
-
getYAxis
public RegularAxis getYAxis()
Description copied from interface:RectilinearGridGets the y axis of the grid.- Specified by:
getYAxisin interfaceRectilinearGrid- Specified by:
getYAxisin interfaceRegularGrid- Overrides:
getYAxisin classRectilinearGridImpl
-
-