nearestPointFeature

fun nearestPointFeature(target: Position, points: List<Point>, units: Units = Units.Kilometers): Feature<Point>
fun nearestPointFeature(target: Point, points: List<Point>, units: Units = Units.Kilometers): Feature<Point>

Takes a target Point and a List of Point geometries and returns the point from the list closest to the reference. This calculation is geodesic.

Parameters

target

the reference coordinates

points

against input point set

units

the units of the numeric result, default Units.Kilometers


fun nearestPointFeature(target: Point, featureCollection: FeatureCollection, units: Units = Units.Kilometers): Feature<Point>

Takes a target Point and a List of Point geometries and returns the point from the list closest to the reference. This calculation is geodesic.

Parameters

target

the reference coordinates

featureCollection

against input point set. At least one feature must be of instance Point

units

the units of the numeric result, default Units.Kilometers