Class NearestNeighbourCoverage

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

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

A TypedCoverage that will find the nearest match that is within maxDistance.

  • Nested Class Summary

    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
    NearestNeighbourCoverage(Supplier<NearestNeighbourIndex> indexSupplier, nz.org.riskscape.engine.types.Type type, org.geotools.api.referencing.crs.CoordinateReferenceSystem coordinateReferenceSystem, nz.org.riskscape.engine.SRIDSet sridSet)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    evaluate(org.locationtech.jts.geom.Point point)
     
    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

    • NearestNeighbourCoverage

      public NearestNeighbourCoverage(Supplier<NearestNeighbourIndex> indexSupplier, nz.org.riskscape.engine.types.Type type, org.geotools.api.referencing.crs.CoordinateReferenceSystem coordinateReferenceSystem, nz.org.riskscape.engine.SRIDSet sridSet)
      Parameters:
      indexSupplier - to obtain the nearest neighbour index when it is first required.
      type - the struct type of the tuples that the index will return.
      coordinateReferenceSystem - the crs of the indexed geometry. Points will be reprojected to this crs before being used to query the index
      sridSet - to use for reprojecting geometries
  • Method Details

    • evaluate

      public Object evaluate(org.locationtech.jts.geom.Point point)
      Specified by:
      evaluate 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
    • getIndex

      public NearestNeighbourIndex getIndex()
    • getType

      public nz.org.riskscape.engine.types.Type getType()
      Specified by:
      getType 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