|
GeoAPI 1.0 Build 2004-05-18 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Represent the basic implementation which provides access to grid coverage data.
A GridCoverage implementation may provide the ability to update
grid values.
RenderedImage,
PixelAccessor
CV_GridCoverage
| Method Summary | |
|---|---|
boolean[] |
getDataBlock(GridRange gridRange,
boolean[] destination)
Return a sequence of boolean values for a block. |
byte[] |
getDataBlock(GridRange gridRange,
byte[] destination)
Return a sequence of 8 bits values for a block. |
double[] |
getDataBlock(GridRange gridRange,
double[] destination)
Return a sequence of double values for a block. |
float[] |
getDataBlock(GridRange gridRange,
float[] destination)
Return a sequence of float values for a block. |
int[] |
getDataBlock(GridRange gridRange,
int[] destination)
Return a sequence of 32 bits values for a block. |
short[] |
getDataBlock(GridRange gridRange,
short[] destination)
Return a sequence of 16 bits values for a block. |
GridGeometry |
getGridGeometry()
Information for the grid coverage geometry. |
GridPacking |
getGridPacking()
Information for the packing of grid coverage values. |
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 overviewIndex)
Returns a pre-calculated overview for a grid coverage. |
GridGeometry |
getOverviewGridGeometry(int overviewIndex)
Returns the grid geometry for an overview. |
byte[] |
getPackedDataBlock(GridRange gridRange)
Return a block of grid coverage data for all sample dimensions. |
GridCoverage |
getSource(int sourceDataIndex)
Returns the source data for a grid coverage. |
boolean |
isDataEditable()
Returns true if grid data can be edited. |
void |
setDataBlock(GridRange gridRange,
boolean[] values)
Set a block of boolean values for all sample dimensions. |
void |
setDataBlock(GridRange gridRange,
byte[] values)
Set a block of 8 bits values for all sample dimensions. |
void |
setDataBlock(GridRange gridRange,
double[] values)
Set a block of double values for all sample dimensions. |
void |
setDataBlock(GridRange gridRange,
float[] values)
Set a block of float values for all sample dimensions. |
void |
setDataBlock(GridRange gridRange,
int[] values)
Set a block of 32 bits values for all sample dimensions. |
void |
setDataBlock(GridRange gridRange,
short[] values)
Set a block of 16 bits values for all sample dimensions. |
void |
setPackedDataBlock(GridRange gridRange,
byte[] values)
Set a block of grid coverage data for all sample dimensions. |
| Methods inherited from interface Coverage |
|---|
evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, getCoordinateReferenceSystem, getDimensionNames, getEnvelope, getMetadataNames, getMetadataValue, getNumSampleDimensions, getNumSources, getRenderableImage, getSampleDimension |
| Method Detail |
|---|
boolean isDataEditable()
true if grid data can be edited.
true if grid data can be edited.
dataEditable
GridPacking getGridPacking()
gridPacking
GridGeometry getGridGeometry()
gridGeometry
int[] getOptimalDataBlockSizes()
null.
null if none.
optimalDataBlockSizes
int getNumOverviews()
numOverviews
GridGeometry getOverviewGridGeometry(int overviewIndex)
throws IndexOutOfBoundsException
overviewIndex - Overview index for which to retrieve grid geometry. Indices start at 0.
IndexOutOfBoundsException - if overviewIndex is out of bounds.
getOverviewGridGeometry
GridCoverage getOverview(int overviewIndex)
throws IndexOutOfBoundsException
numberOverviews-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
overviewIndex - Index of grid coverage overview to retrieve. Indexes start at 0.
IndexOutOfBoundsException - if overviewIndex is out of bounds.
getOverview
GridCoverage getSource(int sourceDataIndex)
throws IndexOutOfBoundsException
GridCoverage was produced from an underlying dataset
(by read(...) for instance) the
getNumSources() method should returns
zero, and this method should not be called.
If the GridCoverage was produced using
{link org.opengis.coverage.processing.GridCoverageProcessor} then it should return the source
grid coverage of the one used as input to GridCoverageProcessor.
In general the getSource(i) method is intended to return the original
GridCoverage on which it depends.
This is intended to allow applications to establish what GridCoverages
will be affected when others are updated, as well as to trace back to the "raw data".
getSource in interface CoveragesourceDataIndex - Source grid coverage index. Indexes start at 0.
IndexOutOfBoundsException - if sourceDataIndex is out of bounds.Coverage.getNumSources(),
getSource(int)
Coverage.getSource
boolean[] getDataBlock(GridRange gridRange,
boolean[] destination)
throws InvalidRangeException,
ArrayIndexOutOfBoundsException
getDataBlock(GridRange, double[])
except for the return type.
gridRange - Grid range for block of data to be accessed.destination - An optionally preallocated array in which to store the values,
or null if none.
destination was non-null, then it is returned.
Otherwise, a new array is allocated and returned.
InvalidRangeException - if gridRange is out of this grid range bounds.
ArrayIndexOutOfBoundsException - if the destination array is not null
and too small to hold the output.setDataBlock(GridRange, boolean[])
getDataBlockAsBoolean
byte[] getDataBlock(GridRange gridRange,
byte[] destination)
throws InvalidRangeException,
ArrayIndexOutOfBoundsException
getDataBlock(GridRange, double[])
except for the return type.
gridRange - Grid range for block of data to be accessed.destination - An optionally preallocated array in which to store the values,
or null if none.
destination was non-null, then it is returned.
Otherwise, a new array is allocated and returned.
InvalidRangeException - if gridRange is out of this grid range bounds.
ArrayIndexOutOfBoundsException - if the destination array is not null
and too small to hold the output.setDataBlock(GridRange, byte[]),
UnpackedImageData
getDataBlockAsByte
short[] getDataBlock(GridRange gridRange,
short[] destination)
throws InvalidRangeException,
ArrayIndexOutOfBoundsException
getDataBlock(GridRange, double[])
except for the return type.
gridRange - Grid range for block of data to be accessed.destination - An optionally preallocated array in which to store the values,
or null if none.
destination was non-null, then it is returned.
Otherwise, a new array is allocated and returned.
InvalidRangeException - if gridRange is out of this grid range bounds.
ArrayIndexOutOfBoundsException - if the destination array is not null
and too small to hold the output.setDataBlock(GridRange, int[]),
UnpackedImageData
getDataBlockAsInteger
int[] getDataBlock(GridRange gridRange,
int[] destination)
throws InvalidRangeException,
ArrayIndexOutOfBoundsException
getDataBlock(GridRange, double[])
except for the return type.
gridRange - Grid range for block of data to be accessed.destination - An optionally preallocated array in which to store the values,
or null if none.
destination was non-null, then it is returned.
Otherwise, a new array is allocated and returned.
InvalidRangeException - if gridRange is out of this grid range bounds.
ArrayIndexOutOfBoundsException - if the destination array is not null
and too small to hold the output.setDataBlock(GridRange, int[]),
Raster.getPixels(int,int,int,int,int[]),
UnpackedImageData
getDataBlockAsInteger
float[] getDataBlock(GridRange gridRange,
float[] destination)
throws InvalidRangeException,
ArrayIndexOutOfBoundsException
getDataBlock(GridRange, double[])
except for the return type.
gridRange - Grid range for block of data to be accessed.destination - An optionally preallocated array in which to store the values,
or null if none.
destination was non-null, then it is returned.
Otherwise, a new array is allocated and returned.
InvalidRangeException - if gridRange is out of this grid range bounds.
ArrayIndexOutOfBoundsException - if the destination array is not null
and too small to hold the output.setDataBlock(GridRange, float[]),
Raster.getPixels(int,int,int,int,float[]),
UnpackedImageData
double[] getDataBlock(GridRange gridRange,
double[] destination)
throws InvalidRangeException,
ArrayIndexOutOfBoundsException
gridRange minimum coordinates to get equivalent grid coordinates.
numSampleDimensions
gridRange - Grid range for block of data to be accessed.destination - An optionally preallocated array in which to store the values,
or null if none.
destination was non-null, then it is returned.
Otherwise, a new array is allocated and returned.
InvalidRangeException - if gridRange is out of this grid range bounds.
ArrayIndexOutOfBoundsException - if the destination array is not null
and too small to hold the output.setDataBlock(GridRange, double[]),
Raster.getPixels(int,int,int,int,double[]),
UnpackedImageData
getValueBlockAsDouble
getValueBlockAsDouble as getDataBlockAsDouble
for consistency with all others getDataBlock... methods and
setDataBlockAsDouble.
byte[] getPackedDataBlock(GridRange gridRange)
throws InvalidRangeException
valueInBytePacking and bandPacking
defined in GridPacking.
The requested grid range must satisfy the following rules for each dimension
of the grid coverage:
UNSIGNED_16BITS)
sample dimension will return 2 bytes for every cell in the block.
| For PixelInterleaved | For grids with multiple sample dimensions, padding occurs between pixels for each change in dimension type. |
| For LineInterleaved | Padding occurs at the end of each row or column (depending on the valueSequence of the grid). |
| For BandSequencial | Padding occurs at the end of every sample dimension. |
valueInBytePacking.
For grid values bigger than 8 bits, the order of their bytes is given by the
value defined in byteInValuePacking.
gridRange - Grid range for block of data to be accessed.
InvalidRangeException - if gridRange is out of this grid range bounds.
#getPackedDataBlock
byte[]
return type, since there is no way to cast an array of arbitrary type to an array
of type byte[]. Even the java.nio.Buffer doesnt allow
that (it allows the opposite way however). |
void setDataBlock(GridRange gridRange,
boolean[] values)
throws InvalidRangeException,
GridNotEditableException,
ArrayIndexOutOfBoundsException
setDataBlock(GridRange, double[]).
gridRange - Grid range for block of data to be accessed.values - Sequence of grid values for the given region.
InvalidRangeException - if gridRange is out of this grid range bounds.
GridNotEditableException - if the grid coverage is not editable.
ArrayIndexOutOfBoundsException - if the values array is too small.isDataEditable(),
getDataBlock(GridRange, boolean[])
setDataBlockAsBoolean
void setDataBlock(GridRange gridRange,
byte[] values)
throws InvalidRangeException,
GridNotEditableException,
ArrayIndexOutOfBoundsException
setDataBlock(GridRange, double[]).
gridRange - Grid range for block of data to be accessed.values - Sequence of grid values for the given region.
InvalidRangeException - if gridRange is out of this grid range bounds.
GridNotEditableException - if the grid coverage is not editable.
ArrayIndexOutOfBoundsException - if the values array is too small.isDataEditable(),
getDataBlock(GridRange, byte[])
setDataBlockAsByte
void setDataBlock(GridRange gridRange,
short[] values)
throws InvalidRangeException,
GridNotEditableException,
ArrayIndexOutOfBoundsException
setDataBlock(GridRange, double[]).
gridRange - Grid range for block of data to be accessed.values - Sequence of grid values for the given region.
InvalidRangeException - if gridRange is out of this grid range bounds.
GridNotEditableException - if the grid coverage is not editable.
ArrayIndexOutOfBoundsException - if the values array is too small.isDataEditable(),
getDataBlock(GridRange, short[])
setDataBlockAsByte
void setDataBlock(GridRange gridRange,
int[] values)
throws InvalidRangeException,
GridNotEditableException,
ArrayIndexOutOfBoundsException
setDataBlock(GridRange, double[]).
gridRange - Grid range for block of data to be accessed.values - Sequence of grid values for the given region.
InvalidRangeException - if gridRange is out of this grid range bounds.
GridNotEditableException - if the grid coverage is not editable.
ArrayIndexOutOfBoundsException - if the values array is too small.isDataEditable(),
getDataBlock(GridRange, int[]),
WritableRaster.setPixels(int,int,int,int,int[])
setDataBlockAsInteger
void setDataBlock(GridRange gridRange,
float[] values)
throws InvalidRangeException,
GridNotEditableException,
ArrayIndexOutOfBoundsException
setDataBlock(GridRange, double[]).
gridRange - Grid range for block of data to be accessed.values - Sequence of grid values for the given region.
InvalidRangeException - if gridRange is out of this grid range bounds.
GridNotEditableException - if the grid coverage is not editable.
ArrayIndexOutOfBoundsException - if the values array is too small.isDataEditable(),
getDataBlock(GridRange, float[]),
WritableRaster.setPixels(int,int,int,int,float[])
setDataBlockAsInteger
void setDataBlock(GridRange gridRange,
double[] values)
throws InvalidRangeException,
GridNotEditableException,
ArrayIndexOutOfBoundsException
numSampleDimensions
gridRange - Grid range for block of data to be accessed.values - Sequence of grid values for the given region.
InvalidRangeException - if gridRange is out of this grid range bounds.
GridNotEditableException - if the grid coverage is not editable.
ArrayIndexOutOfBoundsException - if the values array is too small.isDataEditable(),
getDataBlock(GridRange, double[]),
WritableRaster.setPixels(int,int,int,int,double[])
setDataBlockAsDouble
void setPackedDataBlock(GridRange gridRange,
byte[] values)
throws InvalidRangeException,
GridNotEditableException,
ArrayIndexOutOfBoundsException
getPackedDataBlock(org.opengis.coverage.grid.GridRange) for details on how to pack the values.
gridRange - Grid range for block of data to be accessed.values - Sequence of grid values for the given region.
InvalidRangeException - if gridRange is out of this grid range bounds.
GridNotEditableException - if the grid coverage is not editable.
ArrayIndexOutOfBoundsException - if the values array is too small.
setPackedDataBlock
byte[] argument type, since we can't easily cast an array
of byte[] to an array of arbitrary type. |
|
GeoAPI 1.0 Build 2004-05-18 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
Symbols, terms and definitions | Copyright OpenGIS® Consortium |