There are several special operators for performing geographic queries that can be used with GeoPointFields:
within_distance
- provide a list containing a point and a maximum distance (for example, [(41.342, -87.653), 5])
within_spherical_distance
- Same as above, but using a spherical geomodel (for example, [(41.342, -87.653), 5 / earth_radius])
near
- order documents by how close they are to the given point near_sphere - Same as above, but using a spherical geomodel
within_box
- filter documents by those that are in the specified bounding box (for example, [(35.0, -125.0), (40.0, -100.0)])
within_polygon
- filter documents for those that are in the given polygon (for example, [(41.91, -87.69), (41.92, -87.68), (41.91, -87.65), (41.89, -87.65)]) ... note: : Requires Mongo Server 2.0