Method Near
Near<TCoordinates>(string, GeoJsonPoint<TCoordinates>)
Tests that the value of the named element is near a point (see $near).
public static IMongoQuery Near<TCoordinates>(string name, GeoJsonPoint<TCoordinates> point) where TCoordinates : GeoJsonCoordinates
Parameters
name
stringThe name of the element to test.
point
GeoJsonPoint<TCoordinates>The point.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TCoordinates
The type of the coordinates.
Near<TCoordinates>(string, GeoJsonPoint<TCoordinates>, double)
Tests that the value of the named element is near some location (see $near).
public static IMongoQuery Near<TCoordinates>(string name, GeoJsonPoint<TCoordinates> point, double maxDistance) where TCoordinates : GeoJsonCoordinates
Parameters
name
stringThe name of the element to test.
point
GeoJsonPoint<TCoordinates>The point.
maxDistance
doubleThe max distance.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TCoordinates
The type of the coordinates.
Near<TCoordinates>(string, GeoJsonPoint<TCoordinates>, double, bool)
Tests that the value of the named element is near some location (see $near).
public static IMongoQuery Near<TCoordinates>(string name, GeoJsonPoint<TCoordinates> point, double maxDistance, bool spherical) where TCoordinates : GeoJsonCoordinates
Parameters
name
stringThe name of the element to test.
point
GeoJsonPoint<TCoordinates>The point.
maxDistance
doubleThe max distance.
spherical
boolif set to
true
then the query will be translated to $nearSphere.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TCoordinates
The type of the coordinates.
Near(string, double, double)
Tests that the value of the named element is near some location (see $near).
public static IMongoQuery Near(string name, double x, double y)
Parameters
name
stringThe name of the element to test.
x
doubleThe x value of the origin.
y
doubleThe y value of the origin.
Returns
- IMongoQuery
An IMongoQuery.
Near(string, double, double, double)
Tests that the value of the named element is near some location (see $near).
public static IMongoQuery Near(string name, double x, double y, double maxDistance)
Parameters
name
stringThe name of the element to test.
x
doubleThe x value of the origin.
y
doubleThe y value of the origin.
maxDistance
doubleThe max distance.
Returns
- IMongoQuery
An IMongoQuery.
Near(string, double, double, double, bool)
Tests that the value of the named element is near some location (see $near).
public static IMongoQuery Near(string name, double x, double y, double maxDistance, bool spherical)
Parameters
name
stringThe name of the element to test.
x
doubleThe x value of the origin.
y
doubleThe y value of the origin.
maxDistance
doubleThe max distance.
spherical
boolif set to
true
then the query will be translated to $nearSphere.
Returns
- IMongoQuery
An IMongoQuery.