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
ConstructorsConstructorDescriptionNearestNeighbourCoverage(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 TypeMethodDescriptionevaluate(org.locationtech.jts.geom.Point point) org.geotools.api.referencing.crs.CoordinateReferenceSystemOptional<org.geotools.geometry.jts.ReferencedEnvelope>getIndex()Optional<BiFunction<org.locationtech.jts.geom.Point,Integer, List<nz.org.riskscape.engine.coverage.SampledValue>>> nz.org.riskscape.engine.types.TypegetType()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nz.org.riskscape.engine.coverage.TypedCoverage
asRelation, getEvaluateIntersectingValuesOp, 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 indexsridSet- to use for reprojecting geometries
-
-
Method Details
-
evaluate
- Specified by:
evaluatein interfacenz.org.riskscape.engine.coverage.TypedCoverage
-
getNClosestOp
public Optional<BiFunction<org.locationtech.jts.geom.Point,Integer, getNClosestOp()List<nz.org.riskscape.engine.coverage.SampledValue>>> - Specified by:
getNClosestOpin interfacenz.org.riskscape.engine.coverage.TypedCoverage
-
getEnvelope
- Specified by:
getEnvelopein interfacenz.org.riskscape.engine.coverage.TypedCoverage
-
getIndex
-
getType
public nz.org.riskscape.engine.types.Type getType()- Specified by:
getTypein interfacenz.org.riskscape.engine.coverage.TypedCoverage
-
getCoordinateReferenceSystem
public org.geotools.api.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()- Specified by:
getCoordinateReferenceSystemin interfacenz.org.riskscape.engine.coverage.TypedCoverage
-