logo separator

[mkgmap-dev] Again on address search in latin countries

From Carlos Dávila cdavilam at orangecorreo.es on Mon Sep 19 17:21:36 BST 2016

I see some issues with your approach. First of all, I don't agree last 
word is the meaningful one, at least for Spanish. I can think of many 
real street names where it is not true.

If I got that right, your rule for label:3 won't give the expected 
result for special cases treated in previous lines. For example, "Via 
Vittorio Emanuele XI" would became "Emanuele XI, Via Vittoria Emanuele "

And for label:4, removing first word would also give wrong names in many 
cases, where the type of way (Via, Rue, Avenida, etc) is followed by 
some articles or prepositions, which is very common. For example, 
Avenida de la Libertad would became "de la Libertad", which doesn't make 
much sense and is not very useful for search. For these cases it could 
be useful to have a list of "street names beginnings" to be removed (eg. 
Calle, Calle de la, Calle de el, Calle del, Calle la, Calle, el, etc.)


El 18/09/16 a las 09:33, Enrico Liboni escribió:
> Folks the index branch has been merged with main since sometime and 
> the experimental --x-split-name-index works for me as documented but I 
> still don't get an optimal user experience.
>
> Example, there might be multiple streets named with the same word 
> (example in Padova, Italy: Via Dietro Duomo, Piazza del Duomo, 
> Galleria Duomo): if you type "Duomo" the expected behaviour is to have 
> the gps to show the list of available matches, while in the current 
> implementation three lines with just the word "Duomo" appears and you 
> don't know which one to pick.
>
> Without the --x-split-name-index option, adding the below to 
> "inc/address" produces imho a better result overall for latin 
> countries. Please evaluate if to embed some of the logic in 
> "--x-split-name-index" option to set the appropriate labels with the 
> full name of the street,  which if I understood correctly is what the 
> navigator shows.
>
>
> Thanks!
>
> Enrico
>
>
> # Add in inc/address
> # Step 1: in latin countries the last word of a street name is the 
> meaningful one, so get it and
> # consider the exception when the last two words are the meaningful 
> ones (like "Via Vittorio Emanuele XI").
> #
> # Get the last full word if a \s (whitespace) exist in name
> ( mkgmap:country=ITA  | mkgmap:country=FRA | mkgmap:country=CHE | 
> mkgmap:country=ESP) & highway=* & name ~ '.*\s.*' { set  
> last:word='${name|part: :-1}' }
> # if the last full word is a roman number - i.e. if a street has been 
> named after a King or a Pope - get the last two words
> last:word ~ '(I|II|III|IV|V|VI.*|IX|X|XI.*|XV.*|XX.*)'  {set 
> last:word='${name|part: >-3}' }
> #
> # Step 2: set the labels used for address search (3&4):
> #  the 3rd label  is set with the last:word as 1st word followed by 
> comma and the remaining words
> #     i.e. 'Via Wolfgang Amadeus Mozart' becomes 'Mozart, Via Wolfgang 
> Amadeus'
> #  the 4th label is set  the 1st word (that is usually Via, Rue, 
> Avenida etc, so not really useful in search)
> #     i.e. 'Via Wolfgang Amadeus Mozart' becomes 'Wolfgang Amadeus Mozart'
> last:word=*  { set mkgmap:label:3='${last:word}, ${name|part: 
> <-1}';set mkgmap:label:4='${name|part: >1}' }
>
>
>
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20160919/22adcff0/attachment.html>


More information about the mkgmap-dev mailing list