logo separator

[mkgmap-dev] location-autofill=bounds uses a boundary not surrounding the POI

From WanMil wmgcnfg at web.de on Fri Aug 24 21:17:59 BST 2012

> Hi
>
>> I wonder if we should change the behaviour if no city name is found
>> should be changed:
>>
>> 1. Is it possible to have an empty city name? I think mkgmap users do
>> not expect that the nearest algorithm is used if city name could not be
>> assigned and location-autofill=nearest is not set. If the city name
>> could not be empty we could set a default city name.
>
>
> I think that the autofill option should be completely separate to the
> bounds option. If you want to use the pre-compiled bounds then use the
> --bounds option, and to use the autofill feature, use the
> --location-autofill option. To get both, give both options.

Thinking your idea out we could completely remove the bounds parameter 
of the location-autofill option because the bounds parameter does not 
automatically fill the location. It only adds tags with the boundary 
names which then can be used in the style file to assign the 
city/zip/region/country fields.

So the idea is to remove the bounds parameter from the location-autofill 
option. 2nd change is to remove the default value from the bounds 
option. The LocationHook adds the extra tags from the precompiled bounds 
only if the bounds parameter points to valid precompiled bounds.

The change is not downwards compatible so implementors must change their 
option files when upgrading. Do you think that's ok?


>
> I don't much like the results of the autofill options from my
> experience in the UK at least.  I think it is much better for the city
> name to be empty than wrong.
>
> I see two main problems with using nearest city.
>
> 1. If the tiles are split so that the correct city node is in another
> tile then the nearest town will always be wrong.
>
> 2. If there is (for example) a large town and a small village 5 miles
> apart then a node 2 miles from the small village will be allocated to
> the village, whereas in reallity is much more likely to have an
> address in the large town.

I aggree. I don't like the nearest algorithm too but it is kept because 
some mkgmap users voted against removing it.

>
>> 2. The nearest algorithm uses city POIs only. At the time the algorithm
>> was implemented this was a reasonable choice. I would now change that to
>> use all POIs so that neighboured POIs with a city information could be
>> used to find the city name. In this case an addr:city tag of a
>> neighboured POI could also be used to set the city name of surrounding
>> POIs without city information. For backward compatibiilty we could add a
>> new location-autofill option for this.
>>
>> What do you think?
>
> Sounds good.

Ok, I will play around a bit.

>
> How about creating a fall back boundary file by drawing polygons
> around POIS that have the same city, to be used only when the real
> boundaries are not complete?

Sounds complex. I think there is an algorithm that could create such a 
polygon. But I fear it does not work good if you have spelling errors in 
some POIs that produces holes in the boundary polygons. I put that on my 
list and will check that.

>
> ..Steve

WanMil




More information about the mkgmap-dev mailing list