First experiences with GeoCouch
To learn some new stuff about cool databases and geo-aware services we started fiddling with GeoCouch, a CouchDB extension. To have a real scenario we could work on, we designed a small project: A CouchDB database contains documents with descriptions of fastfood restaurants. We agreed on 3 types of restaurants: KFC, Mc Donalds & Burgerking. We gave them some additonal information, namely opening and closing times and a boolean called “supersize”.
Our goal was to provide a google map with a route search, which then should return all restaurants near the route. We designed an application only depending on CouchDB and a modern Browser as a client. Using jQuery, underscore.js, the Google route boxer and loads of thinking we created that: http://vserver.nedeco.de/nedeco/_design/geoLocate/index.html .
What happens during a request
When the user hits the “calculate” button a series of things start:
- Google Maps calculates the route
- Google Maps Autoboxer calculates the boxes arround the route that contain points in the user-chosen distance to the route
- Our code fires bounding box requests towards the CouchDB GeoCouch handler
- GeoCouch returns lists of restaurants in the given boxes
- Our code collects all those restaurants, paints them to the map and saves them for later use ( filtering )
- We have a nice map, some statistics about our request and the database as well as the option to filter all the received points on client side
Like it ?
2 Responses to First experiences with GeoCouch
Leave a Reply Cancel reply
Recent Posts
Comment
You are watching our devblog. For further information on nedeco please visit nedeco.
Will you code for t-shirts ?
Twitter






Thanks for the blog post! It’s good to see GeoCouch nicely integration into a whole chain of tools/libraries in this mini real world use-case.
Cheers,
Volker
Thanks Volker,
appreciate your feedback and a big thanks for your great work!
Tim