Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created September 9, 2020 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aniruddha27/c7b61f28cdb1e0463e7f308fd435deeb to your computer and use it in GitHub Desktop.
Save aniruddha27/c7b61f28cdb1e0463e7f308fd435deeb to your computer and use it in GitHub Desktop.
# Query 2dsphere index
db.neighborhoods.find({'geometry':
{'$geoWithin':
{'$geometry':
{"type":'Polygon',
'coordinates':[[[-73.89483522924053, 40.8262468412122],
[-73.89487088534919, 40.82393727215577],
[-73.89389702292222, 40.8239839983082],
[-73.89483522924053, 40.8262468412122]]]
}}}}).count()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment