Class DatasetCoverage

java.lang.Object
nz.org.riskscape.engine.data.coverage.DatasetCoverage
All Implemented Interfaces:
nz.org.riskscape.engine.coverage.TypedCoverage, nz.org.riskscape.engine.data.SelfDescribingScalarData

public class DatasetCoverage extends Object implements nz.org.riskscape.engine.coverage.TypedCoverage

Provides TypedCoverage that maps an underlying dataset to latitude and longitude coordinates. An example usage is providing coverage for a 2-dimensional dataset read from a HDF5 shakemap file.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     

    Nested classes/interfaces inherited from interface nz.org.riskscape.engine.coverage.TypedCoverage

    nz.org.riskscape.engine.coverage.TypedCoverage.Empty
  • Field Summary

    Fields inherited from interface nz.org.riskscape.engine.coverage.TypedCoverage

    DEFAULT_CRS
  • Constructor Summary

    Constructors
    Constructor
    Description
    DatasetCoverage(org.geotools.api.geometry.Bounds sourceExtent, Dataset2D dataPoints, DatasetCoverage.GridStartPoint dataStartsAt, nz.org.riskscape.engine.SRIDSet sridSet)
    Creates a new TypedCoverage for a given dataset and its corresponding coordinates
  • Method Summary

    Modifier and Type
    Method
    Description
    evaluate(org.locationtech.jts.geom.Point inputPoint)
     
    org.geotools.api.referencing.crs.CoordinateReferenceSystem
     
    Optional<org.geotools.geometry.jts.ReferencedEnvelope>
     
    nz.org.riskscape.engine.types.Type
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface nz.org.riskscape.engine.coverage.TypedCoverage

    asRelation, getEvaluateIntersectionOp, getScalarDataType
  • Constructor Details

    • DatasetCoverage

      public DatasetCoverage(org.geotools.api.geometry.Bounds sourceExtent, Dataset2D dataPoints, DatasetCoverage.GridStartPoint dataStartsAt, nz.org.riskscape.engine.SRIDSet sridSet)

      Creates a new TypedCoverage for a given dataset and its corresponding coordinates

      Parameters:
      sourceExtent - the latitude/longitude coordinates that this grid corresponds to
      dataPoints - the underlying dataset
      dataStartsAt - the corner of the grid corresponding to index 0,0
  • Method Details

    • getType

      public nz.org.riskscape.engine.types.Type getType()
      Specified by:
      getType in interface nz.org.riskscape.engine.coverage.TypedCoverage
    • evaluate

      public Object evaluate(org.locationtech.jts.geom.Point inputPoint)
      Specified by:
      evaluate in interface nz.org.riskscape.engine.coverage.TypedCoverage
    • getCoordinateReferenceSystem

      public org.geotools.api.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
      Specified by:
      getCoordinateReferenceSystem in interface nz.org.riskscape.engine.coverage.TypedCoverage
    • getEnvelope

      public Optional<org.geotools.geometry.jts.ReferencedEnvelope> getEnvelope()
      Specified by:
      getEnvelope in interface nz.org.riskscape.engine.coverage.TypedCoverage