Class SampleNClosest
java.lang.Object
nz.org.riskscape.engine.function.geometry.BaseSamplingFunction
nz.org.riskscape.engine.function.geometry.SampleNClosest
- All Implemented Interfaces:
AutoCloseable,nz.org.riskscape.engine.function.RiskscapeFunction,nz.org.riskscape.engine.function.UntypedFunction,nz.org.riskscape.engine.rl.RealizableFunction
Returns the n closest samples from a coverage at a given point, sorted closest-first.
Each result is a SampledValue struct with the sampled value and its geometry.
Throws a RiskscapeException if the coverage does not support n-closest sampling.
-
Nested Class Summary
Nested classes/interfaces inherited from interface nz.org.riskscape.engine.rl.RealizableFunction
nz.org.riskscape.engine.rl.RealizableFunction.MetadataIdentifiedRealizableFunction -
Field Summary
Fields inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction
BUILT_IN, LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnz.org.riskscape.engine.function.ArgumentListnz.org.riskscape.engine.types.Typeprotected nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction>realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, nz.org.riskscape.engine.types.Geom geomType, nz.org.riskscape.engine.types.CoverageType coverageType) nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction>realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, nz.org.riskscape.engine.types.Geom geomType, nz.org.riskscape.engine.types.CoverageType coverageType, List<nz.org.riskscape.engine.types.Type> givenTypes) Methods inherited from class nz.org.riskscape.engine.function.geometry.BaseSamplingFunction
call, getArgumentTypes, realizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nz.org.riskscape.engine.rl.RealizableFunction
isDoTypeAdaptationMethods inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction
builtin, close, getAggregationFunction, getOverloaded, getRealizable, getTypesFromArguments, identified, identified, isA, setProblemReporter, validate
-
Constructor Details
-
SampleNClosest
public SampleNClosest()
-
-
Method Details
-
getReturnType
public nz.org.riskscape.engine.types.Type getReturnType()- Specified by:
getReturnTypein interfacenz.org.riskscape.engine.function.RiskscapeFunction- Overrides:
getReturnTypein classBaseSamplingFunction
-
realize
public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction> realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, nz.org.riskscape.engine.types.Geom geomType, nz.org.riskscape.engine.types.CoverageType coverageType, List<nz.org.riskscape.engine.types.Type> givenTypes) - Overrides:
realizein classBaseSamplingFunction
-
realize
protected nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction> realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, nz.org.riskscape.engine.types.Geom geomType, nz.org.riskscape.engine.types.CoverageType coverageType) - Specified by:
realizein classBaseSamplingFunction
-
getArguments
public nz.org.riskscape.engine.function.ArgumentList getArguments()- Specified by:
getArgumentsin interfacenz.org.riskscape.engine.function.RiskscapeFunction- Overrides:
getArgumentsin classBaseSamplingFunction
-