distanceWithin
Returns true when the distance between two geometries is within the given
distance, false otherwise.
Returns false when negative distance is given or when either geometry is empty.
Distance is in input geometry units.
Parameters
| Name | Type | Description |
|---|---|---|
a | Geometry | Prepared<Geometry> | First geometry |
b | Geometry | Second geometry |
maxDistance | number | The maximum distance |
Returns
boolean
true when the distance between the geometries is less than or equal
to the given distance, false otherwise
Throws
GEOSErroron unsupported geometry types (curved)
See also
distancecomputes the distance between two geometriesnearestPointsfinds the nearest points of two geometriesprepareimproves performance of repeated calls against a single geometry