Package org.geotools.api.coverage.grid
Interface GridCoverage
-
- All Superinterfaces:
Coverage
- All Known Subinterfaces:
GridCoverageResponse
- All Known Implementing Classes:
AbstractGridCoverage
,DefaultGridCoverageResponse
,GridCoverage2D
,Interpolator2D
public interface GridCoverage extends Coverage
Represent the basic implementation which provides access to grid coverage data. AGridCoverage
implementation may provide the ability to update grid values.- Since:
- GeoAPI 1.0
- Author:
- Martin Desruisseaux (IRD)
- See Also:
RenderedImage
,PixelAccessor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GridGeometry
getGridGeometry()
Information for the grid coverage geometry.int
getNumOverviews()
Number of predetermined overviews for the grid.int[]
getOptimalDataBlockSizes()
Optimal size to use for each dimension when accessing grid values.GridCoverage
getOverview(int index)
Returns a pre-calculated overview for a grid coverage.GridGeometry
getOverviewGridGeometry(int index)
Returns the grid geometry for an overview.RenderedImage
getRenderedImage()
Returns grid data as a rendered image.List<GridCoverage>
getSources()
Returns the sources data for a grid coverage.boolean
isDataEditable()
Returnstrue
if grid data can be edited.-
Methods inherited from interface Coverage
evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, getCoordinateReferenceSystem, getEnvelope, getNumSampleDimensions, getRangeType, getRenderableImage, getSampleDimension
-
-
-
-
Method Detail
-
isDataEditable
boolean isDataEditable()
Returnstrue
if grid data can be edited.- Returns:
true
if grid data can be edited.
-
getGridGeometry
GridGeometry getGridGeometry()
Information for the grid coverage geometry. Grid geometry includes the valid range of grid coordinates and the georeferencing.- Returns:
- The information for the grid coverage geometry.
-
getOptimalDataBlockSizes
int[] getOptimalDataBlockSizes()
Optimal size to use for each dimension when accessing grid values. These values together give the optimal block size to use when retrieving grid coverage values. For example, a client application can achieve better performance for a 2-D grid coverage by reading blocks of 128 by 128 if the grid is tiled into blocks of this size. The sequence is ordered by dimension. If the implementation does not have optimal sizes, the sequence will benull
.- Returns:
- The optimal size to use for each dimension when accessing grid values, or
null
if none.
-
getNumOverviews
int getNumOverviews()
Number of predetermined overviews for the grid.- Returns:
- The number of predetermined overviews for the grid.
-
getOverviewGridGeometry
GridGeometry getOverviewGridGeometry(int index) throws IndexOutOfBoundsException
Returns the grid geometry for an overview.- Parameters:
index
- Overview index for which to retrieve grid geometry. Indices start at 0.- Returns:
- The grid geometry for an overview.
- Throws:
IndexOutOfBoundsException
- ifoverviewIndex
is out of bounds.
-
getOverview
GridCoverage getOverview(int index) throws IndexOutOfBoundsException
Returns a pre-calculated overview for a grid coverage. The overview indices are numbered from 0 tonumberOverviews-1
. The overviews are ordered from highest (index 0) to lowest (numberOverviews-1
) resolution. Overview grid coverages will have overviews which are the overviews for the grid coverage with lower resolution than the overview. For example, a 1 meter grid coverage with 3, 9, and 27 meter overviews will be ordered as in the left side below. The 3 meter overview will have 2 overviews as in the right side below:1 meter GC 3 meter overview Index resolution 0 3 1 9 2 27 Index resolution 0 9 1 27 - Parameters:
index
- Index of grid coverage overview to retrieve. Indexes start at 0.- Returns:
- A pre-calculated overview for a grid coverage.
- Throws:
IndexOutOfBoundsException
- ifoverviewIndex
is out of bounds.
-
getSources
List<GridCoverage> getSources()
Returns the sources data for a grid coverage. If theGridCoverage
was produced from an underlying dataset (byread(...)
for instance), this method should returns an empty list.If the
GridCoverage
was produced using {link org.geotools.api.coverage.processing.GridCoverageProcessor} then it should return the source grid coverages of the one used as input toGridCoverageProcessor
. In general this method is intended to return the originalGridCoverage
on which it depends.This is intended to allow applications to establish what
GridCoverage
s will be affected when others are updated, as well as to trace back to the "raw data".- Specified by:
getSources
in interfaceCoverage
- Returns:
- The sources data for a grid coverage.
-
getRenderedImage
RenderedImage getRenderedImage()
Returns grid data as a rendered image.
-
-