geoWithinCenterSphere

@JvmName(name = "geoWithinCenterSphereExt")
fun <T> KProperty<T?>.geoWithinCenterSphere(x: Double, y: Double, radius: Double): Bson

Creates a filter that matches all documents containing a property with geospatial data (GeoJSON or legacy coordinate pairs) that exist entirely within the specified circle, using spherical geometry. If using longitude and latitude, specify longitude first.

Return

the filter

Parameters

x

the x coordinate of the circle

y

the y coordinate of the circle

radius

the radius of the circle, in radians


fun <T> geoWithinCenterSphere(property: KProperty<T?>, x: Double, y: Double, radius: Double): Bson

Creates a filter that matches all documents containing a property with geospatial data (GeoJSON or legacy coordinate pairs) that exist entirely within the specified circle, using spherical geometry. If using longitude and latitude, specify longitude first.

Return

the filter

Parameters

property

the data class property

x

the x coordinate of the circle

y

the y coordinate of the circle

radius

the radius of the circle, in radians