Method NearSphere
NearSphere(FieldDefinition<TDocument>, double, double, double?, double?)
Creates a near sphere filter.
public FilterDefinition<TDocument> NearSphere(FieldDefinition<TDocument> field, double x, double y, double? maxDistance = null, double? minDistance = null)
Parameters
field
FieldDefinition<TDocument>The field.
x
doubleThe x.
y
doubleThe y.
maxDistance
double?The maximum distance.
minDistance
double?The minimum distance.
Returns
- FilterDefinition<TDocument>
A near sphere filter.
NearSphere(Expression<Func<TDocument, object>>, double, double, double?, double?)
Creates a near sphere filter.
public FilterDefinition<TDocument> NearSphere(Expression<Func<TDocument, object>> field, double x, double y, double? maxDistance = null, double? minDistance = null)
Parameters
field
Expression<Func<TDocument, object>>The field.
x
doubleThe x.
y
doubleThe y.
maxDistance
double?The maximum distance.
minDistance
double?The minimum distance.
Returns
- FilterDefinition<TDocument>
A near sphere filter.
NearSphere<TCoordinates>(FieldDefinition<TDocument>, GeoJsonPoint<TCoordinates>, double?, double?)
Creates a near sphere filter.
public FilterDefinition<TDocument> NearSphere<TCoordinates>(FieldDefinition<TDocument> field, GeoJsonPoint<TCoordinates> point, double? maxDistance = null, double? minDistance = null) where TCoordinates : GeoJsonCoordinates
Parameters
field
FieldDefinition<TDocument>The field.
point
GeoJsonPoint<TCoordinates>The geometry.
maxDistance
double?The maximum distance.
minDistance
double?The minimum distance.
Returns
- FilterDefinition<TDocument>
A near sphere filter.
Type Parameters
TCoordinates
The type of the coordinates.
NearSphere<TCoordinates>(Expression<Func<TDocument, object>>, GeoJsonPoint<TCoordinates>, double?, double?)
Creates a near sphere filter.
public FilterDefinition<TDocument> NearSphere<TCoordinates>(Expression<Func<TDocument, object>> field, GeoJsonPoint<TCoordinates> point, double? maxDistance = null, double? minDistance = null) where TCoordinates : GeoJsonCoordinates
Parameters
field
Expression<Func<TDocument, object>>The field.
point
GeoJsonPoint<TCoordinates>The geometry.
maxDistance
double?The maximum distance.
minDistance
double?The minimum distance.
Returns
- FilterDefinition<TDocument>
A near sphere filter.
Type Parameters
TCoordinates
The type of the coordinates.