|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@UML(identifier="CV_Coverage", specification=ISO_19123) public interface Coverage
A function from a spatial, temporal or spatiotemporal domain to an attribute range. A coverage
associates a position within its domain to a record of values of
defined data types. Examples include a raster image, polygon overlay, or digital elevation matrix.
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:
PropertySource
or
WritablePropertySource
interface.
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. |
float[] |
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. |
Set<Record> |
evaluate(DirectPosition p,
Set<String> list)
Returns a set of records of feature attribute values for the specified direct position. |
Set<? extends DomainObject> |
evaluateInverse(Record v)
Returns a set of domain objects for the specified record of feature attribute values. |
GeometryValuePair |
find(DirectPosition p)
Returns the nearest geometry-value pair from the specified direct position. |
List<? extends GeometryValuePair> |
find(DirectPosition p,
int limit)
Returns the sequence of geometry-value pairs that include the domain objects nearest to the direct position and their distances from the direction position. |
CommonPointRule |
getCommonPointRule()
Identifies the procedure to be used for evaluating the coverage at a position that falls either on a boundary between geometric objects or within the boundaries of two or more overlapping geometric objects. |
CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Returns the coordinate reference system to which the objects in its domain are referenced. |
InternationalString[] |
getDimensionNames()
Deprecated. This information can be obtained from the underlying coordinate system. |
Set<? extends DomainObject> |
getDomainElements()
Returns the set of domain objects in the domain. |
Set<Extent> |
getDomainExtents()
Returns the extent of the domain of the coverage. |
Envelope |
getEnvelope()
The bounding box for the coverage domain in coordinate reference system coordinates. |
String[] |
getMetadataNames()
Deprecated. Replaced by PropertySource . |
String |
getMetadataValue(String name)
Deprecated. Replaced by PropertySource . |
int |
getNumSampleDimensions()
The number of sample dimensions in the coverage. |
Set<AttributeValues> |
getRangeElements()
Returns the set of attribute values in the range. |
RecordType |
getRangeType()
Describes the range of the coverage. |
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. |
List<? extends Coverage> |
getSources()
Returns the sources data for a coverage. |
Set<? extends GeometryValuePair> |
list()
Returns the dictionary of geometry-value pairs that contain the objects in the domain of the coverage each paired with its record of feature attribute values. |
Set<? extends GeometryValuePair> |
select(Geometry s,
Period t)
Returns the set of geometry-value pairs that contain domain objects that lie within the specified geometry and period. |
Method Detail |
---|
@UML(identifier="CRS", obligation=MANDATORY, specification=ISO_19123) CoordinateReferenceSystem getCoordinateReferenceSystem()
evaluate(...)
methods. This coordinate reference system is usually different than coordinate system of the
grid. It is the target coordinate reference system of the
gridToCRS
math transform.
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.
evaluate(...)
methods.@UML(identifier="envelope", obligation=MANDATORY, specification=OGC_01004) 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
getDomainExtents()
, if any.@UML(identifier="domainExtent", obligation=MANDATORY, specification=ISO_19123) Set<Extent> getDomainExtents()
@UML(identifier="domainElement", obligation=MANDATORY, specification=ISO_19123) Set<? extends DomainObject> getDomainElements()
@UML(identifier="rangeElement", obligation=OPTIONAL, specification=ISO_19123) Set<AttributeValues> getRangeElements()
In the case of a discrete coverage, the size of the range
collection equals that of the domains collection. In other
words, there is one instance of AttributeValues
for each instance of DomainObject
.
Usually, these are stored values that are accessed by the
evaluate
operation.
In the case of a continuous coverage, there is a transfinite
number of instances of AttributeValues
for each DomainObject
. A few instances
may be stored as input for the evaluate
operation,
but most are generated as needed by that operation.
NOTE: ISO 19123 does not specify how the domain and range associations are to be implemented. The relevant data may be generated in real time, it may be held in persistent local storage, or it may be electronically accessible from remote locations.
@UML(identifier="rangeType", obligation=MANDATORY, specification=ISO_19123) RecordType getRangeType()
RecordType
can be used
recursively to describe more complex structures. The range type for a specific coverage
shall be specified in an application schema.
@UML(identifier="commonPointRule", obligation=MANDATORY, specification=ISO_19123) CommonPointRule getCommonPointRule()
@UML(identifier="list", obligation=MANDATORY, specification=ISO_19123) Set<? extends GeometryValuePair> list()
@UML(identifier="select", obligation=MANDATORY, specification=ISO_19123) Set<? extends GeometryValuePair> select(Geometry s, Period t)
s
is null, the operation shall return all geometry-value
pairs that contain domain objects within t
. If the value
of t
is null, the operation shall return all geometry-value
pair that contain domain objects within s
. In the case
of an analytical coverage, the operation shall return the empty set.
@UML(identifier="find", obligation=MANDATORY, specification=ISO_19123) List<? extends GeometryValuePair> find(DirectPosition p, int limit)
limit
.
The default shall be to return a single geometry-value pair. The operation
shall return a warning if the last domain object in the sequence is at
a distance from the direct position equal to the distance of other domain
objects that are not included in the sequence. In the case of an analytical coverage, the operation
shall return the empty set.
NOTE: This operation is useful when the domain of a coverage does not exhaustively partition the extent of the coverage. Even in that case, the first element of the sequence returned may be the geometry-value pair that contains the input direct position.
@UML(identifier="find", obligation=MANDATORY, specification=ISO_19123) GeometryValuePair find(DirectPosition p)
find(p,1)
.
@UML(identifier="evaluate", obligation=MANDATORY, specification=ISO_19123) Set<Record> evaluate(DirectPosition p, Set<String> list)
list
is a sequence of feature attribute names each of which identifies a
field of the range type. If list
is null, the operation shall return a value for
every field of the range type. Otherwise, it shall return a value for each field included in
list
. If the direct position passed is not in the domain of the coverage, then an
exception is thrown. If the input direct position falls within two or more geometric objects
within the domain, the operation shall return records of feature attribute values computed
according to the common point rule.
NOTE: Normally, the operation will return a single record of feature attribute values.
list
parameter should be of type Collection
.@UML(identifier="evaluate", obligation=MANDATORY, specification=OGC_01004) Object evaluate(DirectPosition point) throws CannotEvaluateException
The coordinate reference system of the point is the same as the grid coverage coordinate
reference system (specified by the getCoordinateReferenceSystem()
method).
WARNING: This method is inherited from the legacy OGC 01-004 specification and may be deprecated in a future version. We are for more experience and feedbacks on the value of this 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 evaluated for some other reason.Raster.getDataElements(int, int, Object)
@UML(identifier="evaluateAsBoolean", obligation=MANDATORY, specification=OGC_01004) boolean[] evaluate(DirectPosition point, boolean[] destination) throws CannotEvaluateException, ArrayIndexOutOfBoundsException
The coordinate reference system of the point is the same as the grid coverage coordinate
reference system (specified by the getCoordinateReferenceSystem()
method).
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 evaluated for some othe reason.
ArrayIndexOutOfBoundsException
- if the destination
array is not null
and too small to hold the output.@UML(identifier="evaluateAsByte", obligation=MANDATORY, specification=OGC_01004) byte[] evaluate(DirectPosition point, byte[] destination) throws CannotEvaluateException, ArrayIndexOutOfBoundsException
The coordinate reference system of the point is the same as the grid coverage coordinate
reference system (specified by the getCoordinateReferenceSystem()
method).
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 evaluated for some othe reason.
ArrayIndexOutOfBoundsException
- if the destination
array is not null
and too small to hold the output.@UML(identifier="evaluateAsInteger", obligation=MANDATORY, specification=OGC_01004) int[] evaluate(DirectPosition point, int[] destination) throws CannotEvaluateException, ArrayIndexOutOfBoundsException
The coordinate reference system of the point is the same as the grid coverage coordinate
reference system (specified by the getCoordinateReferenceSystem()
method).
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 evaluated for some othe reason.
ArrayIndexOutOfBoundsException
- if the destination
array is not null
and too small to hold the output.Raster.getPixel(int, int, int[])
float[] evaluate(DirectPosition point, float[] destination) throws CannotEvaluateException, ArrayIndexOutOfBoundsException
The coordinate reference system of the point is the same as the grid coverage coordinate
reference system (specified by the getCoordinateReferenceSystem()
method).
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 evaluated for some othe reason.
ArrayIndexOutOfBoundsException
- if the destination
array is not null
and too small to hold the output.Raster.getPixel(int, int, float[])
@UML(identifier="evaluateAsDouble", obligation=MANDATORY, specification=OGC_01004) double[] evaluate(DirectPosition point, double[] destination) throws CannotEvaluateException, ArrayIndexOutOfBoundsException
The coordinate reference system of the point is the same as the grid coverage coordinate
reference system (specified by the getCoordinateReferenceSystem()
method).
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 evaluated for some othe reason.
ArrayIndexOutOfBoundsException
- if the destination
array is not null
and too small to hold the output.Raster.getPixel(int, int, double[])
@UML(identifier="evaluateInverse", obligation=MANDATORY, specification=ISO_19123) Set<? extends DomainObject> evaluateInverse(Record v)
Example: The evaluateInverse
operation could return a set
of contours derived from the feature attribute values associated with the
grid points of a grid coverage.
@UML(identifier="dimensionNames", obligation=MANDATORY, specification=OGC_01004) InternationalString[] getDimensionNames()
@UML(identifier="numSampleDimensions", obligation=MANDATORY, specification=OGC_01004) int getNumSampleDimensions()
WARNING: This method is inherited from the legacy OGC 01-004 specification and may be deprecated in a future version. We are for more experience and feedbacks on the value of this method.
@UML(identifier="getSampleDimension", obligation=MANDATORY, specification=OGC_01004) SampleDimension getSampleDimension(int index) throws IndexOutOfBoundsException
WARNING: This method is inherited from the legacy OGC 01-004 specification and may be deprecated in a future version. We are for more experience and feedbacks on the value of this method.
index
- Index for sample dimension to retrieve. Indices are numbered 0 to
(n-1).
IndexOutOfBoundsException
- if index
is out of bounds.@UML(identifier="getSource, numSource", obligation=MANDATORY, specification=OGC_01004) List<? extends Coverage> getSources()
Coverage
s
will be affected when others are updated, as well as to trace back to the "raw data".
This implementation specification does not include interfaces for creating collections of coverages therefore the list size will usually be one indicating an adapted grid coverage, or zero indicating a raw grid coverage.
WARNING: This method is inherited from the legacy OGC 01-004 specification and may be deprecated in a future version. We are for more experience and feedbacks on the value of this method.
@UML(identifier="metadataNames", obligation=MANDATORY, specification=OGC_01004) String[] getMetadataNames()
PropertySource
.
getMetadataValue(java.lang.String)
,
PropertySource
@UML(identifier="getMetadataValue", obligation=MANDATORY, specification=OGC_01004) String getMetadataValue(String name) throws MetadataNameNotFoundException
PropertySource
.
name
- Metadata keyword for which to retrieve data.
MetadataNameNotFoundException
- if there is no value for the specified metadata name.getMetadataNames()
,
PropertySource
@Extension 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |