OSM Backend for Point of Interest Searching
RATIONAL:
I'm annoyed by Google's and other's terms of service related to map searching. You really can't do anything useful with Google's search unless you are always connected. You can't save the results for offline use and thus cannot create bookmarks derived from locations you find via a Google map search. To get around this problem, I'm writing an app that will export all the points of interest in the OpenStreetMap project into a database that we can do location based searching on. Best of all, we can actually save the data in the form of bookmarks.
Right now, I'm just dumping all the named nodes into a table. Named nodes are things like "taco bell" with coordinate data and other things related to it. So far, OSM has almost 4 million named nodes. Many of them are street names and city names, and others still are bike and hiking trails. But there are still quite useful. This is the data i'm storing in the database:
Code:
id
label
latitude
longitude
address
Search will be location and radius based. So you'll be able to do a simple query and get nice results:
Code:
SELECT * FROM PointsOfInterest WHERE label LIKE '%taco%' AND latitude < 123.456 AND latitude > 123.546 AND longitude < 49.3243 AND longitude > 49.3122
This should return a bunch of mexican restaraunts for the given rectangular are.
Whats finished:
I've got code that will generate the database. I'm working on optimizing it so it's fast. I want to be able to do monthly sync's with OSM to keep the database up to date.
I'm able to parse the entire planet in a couple hours. Like I said earlier, almost 4 million points of interest. Hopefully we can grow that.
TODO:
Obviously, a web service needs to be created to take advantage of this data. Also, any client needs to know what to do with the data. For LinuxICE, I'll have a client made that will integrate this with navit.
Also, I want to be able for users to add points of interest and contribute that up to OSM. If anyone is interested in helping me do that, that'd be great.
In the future, I want to add tables for streets. This will allow us to do actual address searching.