near

@JvmName(name = "nearExt")
fun <T> KProperty<T?>.near(geometry: Point, maxDistance: Double? = null, minDistance: Double? = null): Bson
@JvmName(name = "nearExt")
fun <T> KProperty<T?>.near(geometry: Bson, maxDistance: Double? = null, minDistance: Double? = null): Bson

Creates a filter that matches all documents containing a property with geospatial data that is near the specified GeoJSON point.

Return

the filter

Parameters

geometry

the bounding GeoJSON geometry object

maxDistance

the maximum distance from the point, in meters

minDistance

the minimum distance from the point, in meters


fun <T> near(property: KProperty<T?>, geometry: Point, maxDistance: Double? = null, minDistance: Double? = null): Bson
fun <T> near(property: KProperty<T?>, geometry: Bson, maxDistance: Double? = null, minDistance: Double? = null): Bson

Creates a filter that matches all documents containing a property with geospatial data that is near the specified GeoJSON point.

Return

the filter

Parameters

property

the data class property

geometry

the bounding GeoJSON geometry object

maxDistance

the maximum distance from the point, in meters

minDistance

the minimum distance from the point, in meters


@JvmName(name = "nearExt")
fun <T> KProperty<T?>.near(x: Double, y: Double, maxDistance: Double? = null, minDistance: Double? = null): Bson

Creates a filter that matches all documents containing a property with geospatial data that is near the specified point.

Return

the filter

Parameters

x

the x coordinate

y

the y coordinate

maxDistance

the maximum distance from the point, in radians

minDistance

the minimum distance from the point, in radians


fun <T> near(property: KProperty<T?>, x: Double, y: Double, maxDistance: Double? = null, minDistance: Double? = null): Bson

Creates a filter that matches all documents containing a property with geospatial data that is near the specified point.

Return

the filter

Parameters

property

the data class property

x

the x coordinate

y

the y coordinate

maxDistance

the maximum distance from the point, in radians

minDistance

the minimum distance from the point, in radians