logo separator

[mkgmap-dev] [index] Automatic location completion

From WanMil wmgcnfg at web.de on Sat Mar 5 17:17:53 GMT 2011

>> I have improved calculation of the country information. In case no
>> country information is available the most used country in a tile is
>> used for all elements without country tag.
>>
>> The patch now patches the trunk and no longer the index branch.
>>
>> I have observed that lots of POIs are assigned the default country
>> although I they are assigned a different country. I have no clue where
>> this happens.
>> Maybe an index related problem? I was hoping that Steves commit today
>> would fix that problem but it didn't.
> My findings with your v3 patch:
> 1-Streets are now correctly assigned to cities, instead of suburbs or
> nearest (wrong) cities. Great!

:-) That was due to the change already committed in r1879.

> 2-State/Province field now includes regions and provinces, not only
> regions as with v2 of your patch. Spanish regions (admin_level=4
> according to [1]) are formed by one or generally more than one province
> (admin_level=6), so every province is part of a region. According to
> that, a place found in a province should also be found in the matching
> region, but this is not the case; some places are assigned to provinces
> and others are assigned to regions.

Mmmh, I don't know how to fix that at the moment. I think I have only 
three attributes which I can set: city, region, country. The question is 
now, which information is assigned to which attribute.

At the moment the rules are as follows:
1. Assign city with admin_level=8,9,10,6,7 (use the first available level)
2. Assign regions with admin_level=6,7,5,3,4 if city is found and 
admin_level=5,3,4 if the city is not assigned
3. Assign country with admin_level=2 or use the most used country in the 
tile

I think these rule might be tuned but I fear that we will need some 
country specific rules in the end. This will be a mess with large config 
files....

> 3-A new country has appeared in the Mediterranean coast of Spain, called
> Maresme;Barcelona;Catalunya;España (coming from node 418639079 or way
> 37229141). Another buggy new country is Vega de Valcarce;León;Castilla y
> León;España,Europe (node 474558975)

The is_in tag contains "," and the Locator is not able to handle that. 
So this is a tagging error. But I think about changing the order of the 
rules how the is_in and the more specific is_in:* tags are used.

> 4-"España" and "Europe" are found under State/Province.

I think thats also due to Locator errors.

> 5-The problem with State/Province info not taken into account when the
> country field is filled in any of the search tabs remains.

I think that's not a problem of the autolocation patch but a problem of 
the MDR generation. Steve might have a look on it.

>
> [1] http://wiki.openstreetmap.org/wiki/Key:admin_level#admin_level

Thanks a lot for your good response!! That's very helpful!
I think this will be a good way to get all the location information right.

WanMil



More information about the mkgmap-dev mailing list