logo separator

[mkgmap-dev] [index] Automatic location completion

From WanMil wmgcnfg at web.de on Thu Feb 24 20:51:34 GMT 2011

>> After the index branch has been developed so far that we can use the
>> results in MapSource (thanks to Steve!!) there is a big need for a
>> mechanism to fill missing location information.
>>
>> There has been a lot of discussion about that. It stopped because it
>> was quite theoretical (from my point of view). Therefore I have
>> started to implement a prototype osm hook that tries to complete the
>> missing location information. I think the is_in tag is quite
>> problematic therefore I decided to use the addr tags.
>>
>> Attached is a *very* early implementation that makes use of the
>> boundary polygons. It checks all nodes and ways/polygons within all
>> boundary polygons and fills the missing addr tags.
>>
>> I think this is a better foundation for the discussion how we want to
>> fill the missing location information.
>>
>> Before flaming me about terrible code please be aware that:
>> * the patch is not optimized
>> * it's version 1, so far away from handling all situations / countries
>> * it's a very early prototype
>>
>> I would be happy if you try it and make some proposals how it could be
>> improved.
>>
>> Some improvements I already know and thinking about:
>> * The new hook should run after the multipolygon finishing and not before
>> * The is_in tag should be handled
> I suppose you mean in case boundary polygons are missing.

Not really. I thought that I should not add any address information if 
the is_in tag is already set. But the is_in tag is very problematic. So 
I should delete this point.

>> * boundary information propagation =>  First go through all boundaries
>> and add the information from higher levels to lower ones, i.e. add
>> addr:district to all city boundaries within that district
>> * Use landuse=residential information in combination with the place nodes
>> * In case a boundary level is missing (which mostly will be the case
>> for countries admin_level=2), select the addr information from all
>> nodes and ways within a boundary by using the most used addr-tag
>> value. (in germany the addr:country=DE should be the most used)
> According to [1], there's a great variety in the matching of
> admin_level=* to places across countries, so it could be useful to have
> some options to choose what admin_level one want to assign to a given
> place=*. In a first try of your patch in Spain I see some streets are
> assigned suburbs while they should be (IMHO) assigned to cities.
> Searching for several streets and leaving city blank I get three (by
> now) patterns:
> street, city, region, country (the right one for me)
> street, suburb, province, country (street assigned to nearest
> place=suburb node)
> street, suburb, region, country (I don't know if street is assigned to
> boundary polygons or to nearest place=suburb node, because both exist
> and unpatched mkgmap gives the same result).
> I could give you ID's of involved nodes, streets and relations if you
> need them.
>
> [1]http://wiki.openstreetmap.org/wiki/Key:admin_level#admin_level

Yes, I expect such configuration needs. It seems as if it will be 
necessary to have a config file for this information (which addr-level 
should be used for which information in which country). I'll put it on 
my list.



More information about the mkgmap-dev mailing list