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
namestringThe name of the element to test.
pointGeoJsonPoint<TCoordinates>The point.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TCoordinatesThe 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
namestringThe name of the element to test.
pointGeoJsonPoint<TCoordinates>The point.
maxDistancedoubleThe max distance.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TCoordinatesThe 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
namestringThe name of the element to test.
pointGeoJsonPoint<TCoordinates>The point.
maxDistancedoubleThe max distance.
sphericalboolif set to
truethen the query will be translated to $nearSphere.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TCoordinatesThe 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
namestringThe name of the element to test.
xdoubleThe x value of the origin.
ydoubleThe 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
namestringThe name of the element to test.
xdoubleThe x value of the origin.
ydoubleThe y value of the origin.
maxDistancedoubleThe 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
namestringThe name of the element to test.
xdoubleThe x value of the origin.
ydoubleThe y value of the origin.
maxDistancedoubleThe max distance.
sphericalboolif set to
truethen the query will be translated to $nearSphere.
Returns
- IMongoQuery
An IMongoQuery.