Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db.BLOOD_PRESSURE.insert({_id:1, foi_geom:[10,10]})
- db.BLOOD_PRESSURE.insert({_id:2, foi_geom:[20,20]})
- db.BLOOD_PRESSURE.insert({_id:3, foi_geom:[30,30]})
- db.BLOOD_PRESSURE.ensureIndex({foi_geom:"2d"})
- public static void test8() throws UnknownHostException, MongoException {
- Mongo mongo = new Mongo();
- DB db = mongo.getDB("test");
- DBCollection coll = db.getCollection("BLOOD_PRESSURE");
- new QueryBuilder();
- DBCursor cur = coll.find(QueryBuilder.start("foi_geom").withinBox(8.1,9.5,55.1,54.5).get());
- while(cur.hasNext())
- System.out.println(cur.next());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement