Created
May 20, 2015 17:47
-
-
Save adamnengland/e9a947f481e70dfb6d92 to your computer and use it in GitHub Desktop.
Mongodb GI examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example of a working query | |
db.postalCode.find( { 'geo' :{ $near :{ $geometry :{ type : "Point" ,coordinates : [ -94.58, 39.09 ] } ,$maxDistance : 10000} } } ); | |
GIS Standard: <Longitude,Latitude> | |
db.businesses.count( { 'geo' :{ $near :{ $geometry :{ type : "Point" ,coordinates : [ -94.595033, 39.102704 ] } ,$maxDistance : 4000} } } ); | |
db.event.find( { 'geo' :{ $near :{ $geometry :{ type : "Point" ,coordinates : [ -94.58, 39.09 ] } ,$maxDistance : 1000} } } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment