You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2008-07-28 05:31:27

JoeGuo
Member
Registered: 2008-07-28
Posts: 2

How to get a complete address from database

I'd like to implement reverse geocoding from OSM database.
1. From lat,lon --> node
2. Node --> way (Current_way_nodes table)
3. From Way Id, I can get some tags from current_way_tags.

My questions is how can I composite these tags into a complete address.
May be the format are like 'door number, street, city, state(province), country'.

The current_way_nodes have 'name' tag, some time the name is a street name, other time it will be a city name. How do I know them exactly.

Thanks  a lot!

Offline

#2 2008-07-28 12:34:41

emj
Member
From: .se (59.3N17.99E) 0735969076
Registered: 2006-06-18
Posts: 949

Re: How to get a complete address from database

First of all Openstreetmap lacks data, it's especially sparse on:
1. house numbers
2. postal codes
3. postal addresses
4. even countries

Just so you know, you can stil build this in areas where you have good OSM coverage, but you will still have problems like wether something is in the US or Mexico.

I would suggest you have a look at http://geonames.org.

JoeGuo wrote:

some time the name is a street name, other time it will be a city name. How do I know them exactly.

What do you mean? Many objects in OSM have names, nodes as well as ways, usually nodes are places like cities and musuems, and the ways represents streets..

Streets are usually ways tagged highway="somthing"
Places nodes tagged with place="something".
House numbers,postal code have no good standard that I know of.

Offline

Board footer

Powered by FluxBB