|
GeoAPI 1.0 Build 2004-05-18 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Provides access to a coverage.
The essential property of coverage is to be able to generate a value for any point
within its domain. How coverage is represented internally is not a concern.
For example consider the following different internal representations of coverage:
SampleDimension for each sample
dimension in the coverage.
GridCoverage will want
to leverage the rich set of Java Advanced
Imaging (JAI) features. For those implementations, it is recommended (but not required) to
implement the PropertySource interface as well. In this case, implementation
of PropertySource methods must be consistent with getMetadataNames()
and getMetadataValue(java.lang.String) methods.
RenderableImage,
ImageFunction
CV_Coverage
| Method Summary | |
|---|---|
Object |
evaluate(DirectPosition point)
Return the value vector for a given point in the coverage. |
boolean[] |
evaluate(DirectPosition point,
boolean[] destination)
Return a sequence of boolean values for a given point in the coverage. |
byte[] |
evaluate(DirectPosition point,
byte[] destination)
Return a sequence of unsigned byte values for a given point in the coverage. |
double[] |
evaluate(DirectPosition point,
double[] destination)
Return a sequence of double values for a given point in the coverage. |
double[] |
evaluate(DirectPosition point,
float[] destination)
Return a sequence of float values for a given point in the coverage. |
int[] |
evaluate(DirectPosition point,
int[] destination)
Return a sequence of integer values for a given point in the coverage. |
CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Specifies the coordinate reference system used when accessing a coverage or grid coverage with the evaluate(...) |
String[] |
getDimensionNames()
The names of each dimension in the coverage. |
Envelope |
getEnvelope()
The bounding box for the coverage domain in coordinate reference system coordinates. |
String[] |
getMetadataNames()
List of metadata keywords for a coverage. |
String |
getMetadataValue(String name)
Retrieve the metadata value for a given metadata name. |
int |
getNumSampleDimensions()
The number of sample dimensions in the coverage. |
int |
getNumSources()
Number of grid coverages which the grid coverage was derived from. |
RenderableImage |
getRenderableImage(int xAxis,
int yAxis)
Returns 2D view of this coverage as a renderable image. |
SampleDimension |
getSampleDimension(int index)
Retrieve sample dimension information for the coverage. |
Coverage |
getSource(int sourceDataIndex)
Returns the source data for a coverage. |
| Method Detail |
|---|
CoordinateReferenceSystem getCoordinateReferenceSystem()
evaluate(...) methods. It is also the coordinate
reference system of the coordinates used with the math transform (see
gridToCoordinateSystem).
This coordinate reference system is usually different than coordinate system of the grid.
Grid coverage can be accessed (re-projected) with new coordinate reference system with the
GridCoverageProcessor component. In this case, a new instance of a
grid coverage is created.
null.
The gridToCoordinateSystem)
attribute should also be null if the coordinate reference system is null.
evaluate(...) methods, or null.
coordinateSystem
Envelope getEnvelope()
If a grid coverage does not have any associated coordinate reference system, the minimum and maximum coordinate points for the envelope will be empty sequences.(Minimum row - 0.5, Minimum column - 0.5) for the minimum coordinates (Maximum row - 0.5, Maximum column - 0.5) for the maximum coordinates
envelope
String[] getDimensionNames()
dimensionNames
int getNumSampleDimensions()
numSampleDimensions
SampleDimension getSampleDimension(int index)
throws IndexOutOfBoundsException
index - Index for sample dimension to retrieve. Indices are numbered 0 to
(n-1).
IndexOutOfBoundsException - if index is out of bounds.
getSampleDimension
int getNumSources()
numSource
Coverage getSource(int sourceDataIndex)
throws IndexOutOfBoundsException
Coverages
will be affected when others are updated, as well as to trace back to the "raw data".
sourceDataIndex - Source coverage index. Indexes start at 0.
IndexOutOfBoundsException - if sourceDataIndex is out of bounds.getNumSources(),
GridCoverage.getSource(int)
getSource
String[] getMetadataNames()
getMetadataValue(java.lang.String),
PropertySource
metadataNames
String getMetadataValue(String name)
throws MetadataNameNotFoundException
name - Metadata keyword for which to retrieve data.
MetadataNameNotFoundException - if there is no value for the specified metadata name.getMetadataNames(),
PropertySource
getMetadataValue
Object evaluate(DirectPosition point)
throws CannotEvaluateException
getCoordinateReferenceSystem() method).
point - Point at which to find the grid values.
PointOutsideCoverageException - if the point is outside the coverage
envelope.
CannotEvaluateException - If the point can't be evaluate for some othe reason.Raster.getDataElements(int, int, Object)
evaluate
boolean[] evaluate(DirectPosition point,
boolean[] destination)
throws CannotEvaluateException,
ArrayIndexOutOfBoundsException
point - Point at which to find the coverage values.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.
PointOutsideCoverageException - if the point is outside the coverage
envelope.
CannotEvaluateException - if the point can't be evaluate for some othe reason.
ArrayIndexOutOfBoundsException - if the destination array is not null
and too small to hold the output.
evaluateAsBoolean
byte[] evaluate(DirectPosition point,
byte[] destination)
throws CannotEvaluateException,
ArrayIndexOutOfBoundsException
point - Point at which to find the coverage values.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.
PointOutsideCoverageException - if the point is outside the coverage
envelope.
CannotEvaluateException - if the point can't be evaluate for some othe reason.
ArrayIndexOutOfBoundsException - if the destination array is not null
and too small to hold the output.
evaluateAsByte
int[] evaluate(DirectPosition point,
int[] destination)
throws CannotEvaluateException,
ArrayIndexOutOfBoundsException
point - Point at which to find the grid values.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.
PointOutsideCoverageException - if the point is outside the coverage
envelope.
CannotEvaluateException - if the point can't be evaluate for some othe reason.
ArrayIndexOutOfBoundsException - if the destination array is not null
and too small to hold the output.Raster.getPixel(int, int, int[])
evaluateAsInteger
double[] evaluate(DirectPosition point,
float[] destination)
throws CannotEvaluateException,
ArrayIndexOutOfBoundsException
point - Point at which to find the grid values.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.
PointOutsideCoverageException - if the point is outside the coverage
envelope.
CannotEvaluateException - if the point can't be evaluate for some othe reason.
ArrayIndexOutOfBoundsException - if the destination array is not null
and too small to hold the output.Raster.getPixel(int, int, float[])
double[] evaluate(DirectPosition point,
double[] destination)
throws CannotEvaluateException,
ArrayIndexOutOfBoundsException
point - Point at which to find the grid values.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.
PointOutsideCoverageException - if the point is outside the coverage
envelope.
CannotEvaluateException - If the point can't be evaluate for some othe reason.
ArrayIndexOutOfBoundsException - if the destination array is not null
and too small to hold the output.Raster.getPixel(int, int, double[])
evaluateAsDouble
RenderableImage getRenderableImage(int xAxis,
int yAxis)
throws UnsupportedOperationException,
IndexOutOfBoundsException
GridCoverage backed
by a RenderedImage, the underlying image can be obtained
with:
getRenderableImage(0,1).createDefaultRendering()
xAxis - Dimension to use for the x axis.yAxis - Dimension to use for the y axis.
UnsupportedOperationException - if this optional operation is not supported.
IndexOutOfBoundsException - if xAxis or yAxis is out of bounds.
|
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 |