[Geocoding] Database querying
emilie.laffray at gmail.com
Thu Sep 10 14:03:34 BST 2009
2009/9/10 Sajjad Anwar <sajjadkm at gmail.com>
> Im new to this list. Perhaps my first email.
> Im trying to write a geocoding application for my city (Calicut, Kerala,
> India). Currently Im updating the database using JOSM. I understood that, I
> need to query the database with the string the user provider through my
> application. What is the way for that? I also understood that, as Im in
> India, we can reduce the false results by extrating the smaller subset of
> India Database. How could that be done? Somebody in the channel gave me an
> XML datasheet of India. How do I use that into a database in my server and
> application? I plan to code in Python.
> Please help. Thank you.
The first thing that you want is to get an extract of the database. You
could download the entire planet or you can go to either Cloudmade or
Geofabrik sites to have that database. http://planet.openstreetmap.org
Since you are mostly concerned about your city, grab the smallest extract of
India and then use Osmosis to cut this extract with a bounding containing
your town. http://wiki.openstreetmap.org/wiki/Osmosis
There are two tools to import OSM data into a postgres database: Osmosis and
osm2pgsql. They have 2 different schemas. Osmosis is quite complete but more
difficult to work this, while osm2pgsql is done for Mapnik rendering.
It is likely that if you are building a geocoding application from scratch,
that you will need to extract the data from one of those schemas. Else, you
can ask around if you could use one of the existing engine for your town.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Geocoding