[OSM-dev] How to tag addresses
dave at sr71.net
Thu Jun 14 01:16:21 BST 2007
On Wed, 2007-06-13 at 16:14 -0700, Brandon Martin-Anderson wrote:
> The problem with address geocoding is like this: there is absolutely
> no national standard for street addressing, let alone international
> standard. Any and every assumption you make about the way addresses
> should work can be and is violated all the time. Street addresses can
> even be out of order, even in some places in the US. The only way to
> use a single dataset for address geocoding on a national scale is dumb
> brute force - for every little segment one or more address ranges is
> specificed for both the right and lefthand side of the street (with
> respect to the direction the line is traveling, even when the line is
> a two-way street).
Sounds sensible. I do worry what happens if, for instance, a segment
has its direction changed. This is pretty common when people are
merging ways together. Whatever was doing the merging would need to
have the knowledge to flip around those address tags.
Would it be more sensible to make these cardinal-direction-based,
instead of left/right? Addresses for the north and south sides of the
street? If the street was perfectly north/south, you could pick either
east or west to be the surrogate north.
> This his how the TIGER/line dataset works. The OSM may be a bad place
> to store address range information, as vandals or well-meaning
> uninformed people could easily ruin it and it would be very difficult
> to detect. But i figured as long as I'm importing the TIGER dataset, I
> might as well give it a go.
It does seem like whatever happens with the TIGER data, we should
probably at least annotate it well enough in OSM to tell where it came
from. That way, we could do things like add the addressing information
at a later time if we have to.
> I have a proposal for how you could do it with no extension to the
> TIGER data model. I attached a diagram which illustrates the problem
> and my idea. In order to keep an address range for a set of segments
> which may be a small sub-portion of a way, you add a tag to the node
> which says where the dates start on a particular adjacent segment. For
> example if a node abuts segment id=23423, where the address is 1440,
> then the tag would be "address_23423 = 1440".
Instead of modifying the segments themselves, perhaps we need to modify
the segment entries in a way. In XML we have this:
and in the database we have the way_segments table.
If we added tags like this:
that weren't part of the segment entity themselves, but were only part
of the way_segments, we could do this as only an extension to the
current data model.
We'd have to teach the editors about it, but harder things have been
done before. :)
More information about the dev