This is really a long term story. Investigate on different database systems and perhaps do some comparison. Some ideas: http://www.mongodb.org/display/DOCS/Geospatial+Indexing https://github.com/couchbase/geocouch https://github.com/MapQuest/mapquest-osm-server