forked from ChrisKozak/Jitney
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
23 lines (17 loc) · 881 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
The purpose of this app is to enable people in areas underserved by public transit and taxi service to provide ad-hoc transportation to those in need of it.
http://www.cnt.org/news/2012/10/22/7050/#more-7050
(Wait at least 10 min, longer if it's the first build. Vagrant is downloading an Ubuntu image and all of the dependencies defined in the puppet manifest)
When it finishes, type "vagrant ssh"
(You are now in the virtual machine)
Type "cd /vagrant"
(You are now in the shared project directory)
How to query points within shapes in Mongo
First, type mongo.
Then try the following:
db.points.insert({ pos : [10,10] })
db.points.insert({ pos : [1,1] })
db.points.ensureIndex({ pos : "2d" })
box = [[0,0],[2,2]]
db.points.find({"pos": {"$within":{"$box": box}}})
polygon = [[0,0],[0,1],[0,2],[2,2],[2,0]]
db.points.find({"pos": {"$within":{"$polygon": polygon}}})