Skip to main content

nearestAll

Returns all geometries with the minimum distance to the query geometry.

Cartesian distance is calculated between the actual geometries, not their bounding boxes.

Parameters​

NameTypeDescription
geometryGeometryGeometry for which the nearest neighbors are queried

Returns​

G[]

An array of all nearest geometries with the same minimum distance to the query geometry, or an empty array if the tree is empty

Throws​

  • GEOSError if any of the considered candidates for the nearest geometry is one of unsupported geometry types (curved)

Examples​