fun <T> KProperty<T>.nearSphere(geometry: Bson, maxDistance: Double? = null, minDistance: Double? = null): Bson
(source)fun <T> KProperty<T>.nearSphere(geometry: Point, maxDistance: Double? = null, minDistance: Double? = null): Bson
(source)
Creates a filter that matches all documents containing a property with geospatial data that is near the specified GeoJSON point using spherical geometry.
geometry
- the bounding GeoJSON geometry object
maxDistance
- the maximum distance from the point, in meters
minDistance
- the minimum distance from the point, in meters
Return
the filter
Mongodb
.driver.manual reference/operator/query/near/ $near
fun <T> KProperty<T>.nearSphere(x: Double, y: Double, maxDistance: Double? = null, minDistance: Double? = null): Bson
(source)
Creates a filter that matches all documents containing a property with geospatial data that is near the specified point using spherical geometry.
maxDistance
- the maximum distance from the point, in radians
minDistance
- the minimum distance from the point, in radians
Return
the filter
Mongodb
.driver.manual reference/operator/query/near/ $near