Interface TypedCoverage

All Superinterfaces:
SelfDescribingScalarData
All Known Implementing Classes:
TypedCoverage.Empty

public interface TypedCoverage extends SelfDescribingScalarData

A provider of Type values backed by a Coverage.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    An empty coverage, useful for testing, stubs, or proxy implementations
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.geotools.api.referencing.crs.CoordinateReferenceSystem
    A default CoordinateReferenceSystem to return from getCoordinateReferenceSystem() when none is provided with the data.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a tabular view of this data, or empty if it isn't possible.
    empty(Type type)
     
    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.
     
  • Field Details

    • DEFAULT_CRS

      static final org.geotools.api.referencing.crs.CoordinateReferenceSystem DEFAULT_CRS

      A default CoordinateReferenceSystem to return from getCoordinateReferenceSystem() when none is provided with the data. Matches the default from AbstractGridFormat.

  • Method Details

    • empty

      static TypedCoverage empty(Type type)
      Returns:
      an empty TypedCoverage with the given type
    • getType

      Type getType()
      Returns:
      type of values returned by evaluate(org.locationtech.jts.geom.Point)
    • evaluate

      Object evaluate(org.locationtech.jts.geom.Point point)

      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,Object>>>> getEvaluateIntersectionOp()
      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

      default Optional<org.geotools.geometry.jts.ReferencedEnvelope> getEnvelope()
      Returns:
      the geographic bounds of the underlying data, if available.
    • getScalarDataType

      default Type 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. the Struct type of the relation (non-scalar) vs RelationType that represents the relation itself (scalar).

      Specified by:
      getScalarDataType in interface SelfDescribingScalarData
    • asRelation

      default Optional<Relation> 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.