Interface TypedCoverage
- All Superinterfaces:
SelfDescribingScalarData
- All Known Implementing Classes:
TypedCoverage.Empty
A provider of Type
values backed by a Coverage
.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
An empty coverage, useful for testing, stubs, or proxy implementations -
Field Summary
Modifier and TypeFieldDescriptionstatic final org.geotools.api.referencing.crs.CoordinateReferenceSystem
A defaultCoordinateReferenceSystem
to return fromgetCoordinateReferenceSystem()
when none is provided with the data. -
Method Summary
Modifier and TypeMethodDescriptionReturns a tabular view of this data, or empty if it isn't possible.static TypedCoverage
evaluate
(org.locationtech.jts.geom.Point point) Get values from coverage at point.org.geotools.api.referencing.crs.CoordinateReferenceSystem
default Optional<org.geotools.geometry.jts.ReferencedEnvelope>
default Optional<Function<org.locationtech.jts.geom.Geometry,
List<Pair<org.locationtech.jts.geom.Geometry, Object>>>> default Type
Returns the RiskScape type that describes this data when extracted from a project and added in to a pipeline as a scalar value.getType()
-
Field Details
-
DEFAULT_CRS
static final org.geotools.api.referencing.crs.CoordinateReferenceSystem DEFAULT_CRSA default
CoordinateReferenceSystem
to return fromgetCoordinateReferenceSystem()
when none is provided with the data. Matches the default from AbstractGridFormat.
-
-
Method Details
-
empty
- Returns:
- an empty
TypedCoverage
with the given type
-
getType
Type getType()- Returns:
- type of values returned by
evaluate(org.locationtech.jts.geom.Point)
-
evaluate
Get values from coverage at point. Values will be in the type returned by
getType()
- Parameters:
point
- to sample coverages at- Returns:
- result as expected type
-
getEvaluateIntersectionOp
default Optional<Function<org.locationtech.jts.geom.Geometry,List<Pair<org.locationtech.jts.geom.Geometry, getEvaluateIntersectionOp()Object>>>> - Returns:
- a function that can be used for calculating all the parts of the a geometry that intersect with this
grid. The function is 'curried' so that it always applies to this
TypedCoverage
.How the intersection is done is up to each implementation of
TypedCoverage
, but in general, this method should return a new list of geometries paired up with the value of the coverage at each intersection.This method should return Optional.empty if this operation is not supported.
-
getCoordinateReferenceSystem
org.geotools.api.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()- Returns:
- the CRS that the underlying data is represented in
-
getEnvelope
- Returns:
- the geographic bounds of the underlying data, if available.
-
getScalarDataType
Description copied from interface:SelfDescribingScalarData
Returns the RiskScape type that describes this data when extracted from a project and added in to a pipeline as a scalar value.
It is referred to as the scalar type to make it clear it's not the same as the
Type
of the data contained within it, e.g. theStruct
type of the relation (non-scalar) vsRelationType
that represents the relation itself (scalar).- Specified by:
getScalarDataType
in interfaceSelfDescribingScalarData
-
asRelation
Returns a tabular view of this data, or empty if it isn't possible. This method is here to support efficient and streaming through raster data - at the moment there's no perceived need to implement this for non-grid/pixel formats, such as hdf5/netcdf, but who knows what the future holds or what use cases this might allow... <mysterious-science-noises>
The relation's type is expected to at least contain the values that the coverage yields, plus the geometry at each location in the coverage.
-