Add filter functionalities by geo data
This commit is contained in:
@@ -2,3 +2,5 @@
|
||||
|
||||
mongoimport --db entities --collection cars --type json --file cars.json --jsonArray
|
||||
mongoimport --db entities --collection trafficLights --type json --file traffic_lights.json --jsonArray
|
||||
|
||||
mongo --eval 'db.trafficLights.ensureIndex({location:"2dsphere"})' entities
|
||||
@@ -1,16 +1,10 @@
|
||||
[
|
||||
{
|
||||
"id": "1",
|
||||
"location": {
|
||||
"type": "Point",
|
||||
"coordinates": [-73.856077, 40.848447]
|
||||
}
|
||||
"location": [16.315283, 48.190331]
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"location": {
|
||||
"type": "Point",
|
||||
"coordinates": [-73.856077, 40.848447]
|
||||
}
|
||||
"location": [16.316331, 48.192382]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user