logo separator

[mkgmap-dev] routing / address search: What makes a road (, house number, etc.) belong to a city (, country, etc.)

From Gernot Hillier gernot at hillier.de on Tue Apr 21 09:20:05 BST 2009

Hi!

Florian Lohoff wrote:
> On Tue, Apr 21, 2009 at 07:49:05AM +0200, Gernot Hillier wrote:
>> Things which come to my mind to make things belong to others so far, are:
>>
>> 1) tags on the child like is_in or addr:street/addr:city
>> 2) place and boundary polygons for the "parent"
>> 3) relations
> 
> I am in favour of 2 - But i see some problems
> 
> - Missing polygons - Not easy to determin as they are non visible fact.

Well, as soon as we have widespread usage of OSM data for routing, I'm
quite sure people will provide those very quickly. For small cities, one
mapper can do 5 per hour - and for big cities, there are so much bored
mappers already available, you know... :-)

It should also be easy to write tools which make the problem visible in
one or another way.

> - Addresses might not always correlate to administrative boundaries. 
>   Are we shure they do? At least for Phone numbers i am very shure
>   they do not match.

Therefore, I vote for using the place polygon, not the boundary one.
This one should really include all the streets which belong to that
city. I'm feeling this will work for for 99.99% of cases.

> - How do you suggest to migrate - I mean we will have years where
>   our polygons will not be complete so there need to be multiple ways
>   of finding the administrative relation.

Well, if there's no polygon, just fall back to the "nearest city node"
algorithm. A pretty nice description can already be found here:
http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing#City

And IIRC, at least the TravelingSalesMan already has a working
implementation for it.

--
Gernot



More information about the mkgmap-dev mailing list