How can we use prefix/suffix feature in road names?

Hi all, recently I learned about this feature which is already partly implemented in mkgmap, but not easy to use with OSM data. See http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2017q2/026602.html There is at least one visible effect of these 0x1e and 0x1f characters: When you zoom out MapSource removes the prefix / suffix part(s) from the name. So "Rue de la Concorde" is displayed as "Concorde" which requires less space and probably allows to display more names. If I got that right the prefixes and suffixes are also excluded from the index by mkgmap, but that might not yet work. My understanding is that we need a way to change the a road label "Rue de la Concorde" to "Rue de la" + 0x1e +"Concorde" or "Fernrodder Strasse" to "Fernrodder" + 0x1f + "Strasse". Does anybody already use that feature in style rules? I can think of several ways to implement that. 1) A collection of style rules for well known prefixes and suffixes. I fear those would be quite complex. 2) A new option file listing prefixes and suffixes and some Java code to modify all road labels. Format of the file might be prefix=Rue de la prefix=Rue du prefix=Rue de prefix=Rue prefix=Rua prefix=Chemin de la prefix=Chemin du prefix=Chemin de prefix=Chemin ... suffix=Road suffix=Steet suffix=Strasse suffix=Weg ... I assume it is possible to compile a single regular expression from this, so performance should not be a problem. Gerd

Hi A few thoughts on this: Should it be a style invoked function. Can the prefixes and suffixes be country defined and selected by, say, admin boundary. Is there already a place where mkgmap has country dependent info (like drive-on=)? I used to live on "Avenue Road" - slight care needs to be taken on how it is implemented for these strange cases Ticker On Wed, 2017-04-12 at 10:13 +0000, Gerd Petermann wrote:
Hi all,
recently I learned about this feature which is already partly implemented in mkgmap, but not easy to use with OSM data. See http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2017q2/026602.html There is at least one visible effect of these 0x1e and 0x1f characters: When you zoom out MapSource removes the prefix / suffix part(s) from the name. So "Rue de la Concorde" is displayed as "Concorde" which requires less space and probably allows to display more names. If I got that right the prefixes and suffixes are also excluded from the index by mkgmap, but that might not yet work.
My understanding is that we need a way to change the a road label "Rue de la Concorde" to "Rue de la" + 0x1e +"Concorde" or "Fernrodder Strasse" to "Fernrodder" + 0x1f + "Strasse".
Does anybody already use that feature in style rules?
I can think of several ways to implement that. 1) A collection of style rules for well known prefixes and suffixes. I fear those would be quite complex.
2) A new option file listing prefixes and suffixes and some Java code to modify all road labels. Format of the file might be prefix=Rue de la prefix=Rue du prefix=Rue de prefix=Rue prefix=Rua prefix=Chemin de la prefix=Chemin du prefix=Chemin de prefix=Chemin ... suffix=Road suffix=Steet suffix=Strasse suffix=Weg ...
I assume it is possible to compile a single regular expression from this, so performance should not be a problem.
Gerd
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Tcker, do you think of something similar to the highway-symbol filter ? coutry specific information is kept in resources\LocatorConfig.xml . I don't think that this is the right place for this configuration. I think it is more about language than country borders. And yes, there are special cases. I assume we have to make sure that there is at least one word between 0x1e and 0x1f. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Mittwoch, 12. April 2017 13:12:41 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] How can we use prefix/suffix feature in road names? Hi A few thoughts on this: Should it be a style invoked function. Can the prefixes and suffixes be country defined and selected by, say, admin boundary. Is there already a place where mkgmap has country dependent info (like drive-on=)? I used to live on "Avenue Road" - slight care needs to be taken on how it is implemented for these strange cases Ticker On Wed, 2017-04-12 at 10:13 +0000, Gerd Petermann wrote:
Hi all,
recently I learned about this feature which is already partly implemented in mkgmap, but not easy to use with OSM data. See http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2017q2/026602.html There is at least one visible effect of these 0x1e and 0x1f characters: When you zoom out MapSource removes the prefix / suffix part(s) from the name. So "Rue de la Concorde" is displayed as "Concorde" which requires less space and probably allows to display more names. If I got that right the prefixes and suffixes are also excluded from the index by mkgmap, but that might not yet work.
My understanding is that we need a way to change the a road label "Rue de la Concorde" to "Rue de la" + 0x1e +"Concorde" or "Fernrodder Strasse" to "Fernrodder" + 0x1f + "Strasse".
Does anybody already use that feature in style rules?
I can think of several ways to implement that. 1) A collection of style rules for well known prefixes and suffixes. I fear those would be quite complex.
2) A new option file listing prefixes and suffixes and some Java code to modify all road labels. Format of the file might be prefix=Rue de la prefix=Rue du prefix=Rue de prefix=Rue prefix=Rua prefix=Chemin de la prefix=Chemin du prefix=Chemin de prefix=Chemin ... suffix=Road suffix=Steet suffix=Strasse suffix=Weg ...
I assume it is possible to compile a single regular expression from this, so performance should not be a problem.
Gerd
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd Yes, was thinking of a substitution filter (like highway-symbol), but wondering where to put all the prefix/suffix rules, so that the style would be general. Although it is more of a language issue than country, mkgmap, with bounds.zip, has an admin tag for the country. But, for simple implementation, could just get fixed set of prefix/suffix from a command line arg or file. Ticker On Wed, 2017-04-12 at 13:21 +0000, Gerd Petermann wrote:
Hi Tcker,
do you think of something similar to the highway-symbol filter ?
coutry specific information is kept in resources\LocatorConfig.xml . I don't think that this is the right place for this configuration. I think it is more about language than country borders.
And yes, there are special cases. I assume we have to make sure that there is at least one word between 0x1e and 0x1f.
Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Mittwoch, 12. April 2017 13:12:41 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] How can we use prefix/suffix feature in road names?
Hi
A few thoughts on this:
Should it be a style invoked function.
Can the prefixes and suffixes be country defined and selected by, say, admin boundary. Is there already a place where mkgmap has country dependent info (like drive-on=)?
I used to live on "Avenue Road" - slight care needs to be taken on how it is implemented for these strange cases
Ticker
On Wed, 2017-04-12 at 10:13 +0000, Gerd Petermann wrote:
Hi all,
recently I learned about this feature which is already partly implemented in mkgmap, but not easy to use with OSM data. See http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2017q2/026602.html There is at least one visible effect of these 0x1e and 0x1f characters: When you zoom out MapSource removes the prefix / suffix part(s) from the name. So "Rue de la Concorde" is displayed as "Concorde" which requires less space and probably allows to display more names. If I got that right the prefixes and suffixes are also excluded from the index by mkgmap, but that might not yet work.
My understanding is that we need a way to change the a road label "Rue de la Concorde" to "Rue de la" + 0x1e +"Concorde" or "Fernrodder Strasse" to "Fernrodder" + 0x1f + "Strasse".
Does anybody already use that feature in style rules?
I can think of several ways to implement that. 1) A collection of style rules for well known prefixes and suffixes. I fear those would be quite complex.
2) A new option file listing prefixes and suffixes and some Java code to modify all road labels. Format of the file might be prefix=Rue de la prefix=Rue du prefix=Rue de prefix=Rue prefix=Rua prefix=Chemin de la prefix=Chemin du prefix=Chemin de prefix=Chemin ... suffix=Road suffix=Steet suffix=Strasse suffix=Weg ...
I assume it is possible to compile a single regular expression from this, so performance should not be a problem.
Gerd
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Carlos, to be honest, I don't know how to write the rule, so I coded some lines in Java to replace the blank by either 0x1e or 0x1f. I assume it is possible with the subst filter. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Carlos Dávila <cdavilam@orangecorreo.es> Gesendet: Mittwoch, 12. April 2017 16:04:34 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] How can we use prefix/suffix feature in road names? El 12/04/17 a las 12:13, Gerd Petermann escribió:
Does anybody already use that feature in style rules?
Not me, but if you can give an example of how it could be used in a style rule I would like to experiment with it. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi
There is at least one visible effect of these 0x1e and 0x1f characters: When you zoom out MapSource removes the prefix / suffix part(s) from
In addition there is 0x1b which is like 0x1e, except that it does not act as a space. Only known example is is for "L'" being used as a prefix: Rue de L'Abbe Vincent There is also 0x1c which is the non-spacing equivalent of 0x1f, I don't know of any examples of that being used in street names. Since 0x1e and 0x1f are effectively spaces, I've created a patch to make them sort along with and just after space. ..Steve

El 12/04/17 a las 21:48, Steve Ratcliffe escribió:
Hi
There is at least one visible effect of these 0x1e and 0x1f characters: When you zoom out MapSource removes the prefix / suffix part(s) from
In addition there is 0x1b which is like 0x1e, except that it does not act as a space. Only known example is is for "L'" being used as a prefix:
Rue de L'Abbe Vincent
There's also D': Rue D'Aberdeen, Allée D'Albert...
There is also 0x1c which is the non-spacing equivalent of 0x1f, I don't know of any examples of that being used in street names.
Since 0x1e and 0x1f are effectively spaces, I've created a patch to make them sort along with and just after space.
..Steve

Hi all, I've compiled two lists using this method: 1) Collect all names in OSM ways with highway=residential from europe.osm.pbf dated 2017-04-04. I've used this commands: osmfilter europe.o5m --ignore-dependencies --keep= --keep-ways="highway=residential" -o=residential_roads.o5m I've created a small java program based on splitter to 2) Collect those names with at least one blank or apostroph ( ' ) 3) For each name: Find position of blank or apostrop, create prefix as substring from start to position and suffix as substring from position to end. Set position to next blank/apostrop. Stop if none found. Each calculated prefix / suffix is counted. Example : "Chemin de Piere Froide" gives prefixes "Chemin", "Chemin de", "Chemin de Piere" and suffixes "de Piere Froide", "Piere Froide", and "Froide" I've printed those strings with > 1000 occurences sorted by highest occurence first. It seems to me that we need some language experts to sort out which of the strings are useful prefix / suffix strings. I am pretty sure that the "prefix" "Rue Jean" 11476 is not a good candidate but others with smaller numbers are okay, e.g. "Rua de" 5324 .... "Route du" 3329 The suffixes with multiple words are probably not useful, at least not in those languages that I know a little bit. Note that my algo is case sensitive. Maybe we can use these lists to set up a list of prefixes and suffixes ? I am now compiling those lists for a planet file from 2017-01-05. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Carlos Dávila <cdavilam@orangecorreo.es> Gesendet: Mittwoch, 12. April 2017 23:08:45 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] How can we use prefix/suffix feature in road names? El 12/04/17 a las 21:48, Steve Ratcliffe escribió:
Hi
There is at least one visible effect of these 0x1e and 0x1f characters: When you zoom out MapSource removes the prefix / suffix part(s) from
In addition there is 0x1b which is like 0x1e, except that it does not act as a space. Only known example is is for "L'" being used as a prefix:
Rue de L'Abbe Vincent
There's also D': Rue D'Aberdeen, Allée D'Albert...
There is also 0x1c which is the non-spacing equivalent of 0x1f, I don't know of any examples of that being used in street names.
Since 0x1e and 0x1f are effectively spaces, I've created a patch to make them sort along with and just after space.
..Steve
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

the lists for planet are here: http://files.mkgmap.org.uk/download/347/suffix-prefix-planet.zip Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <GPetermann_muenchen@hotmail.com> Gesendet: Donnerstag, 13. April 2017 16:35:42 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] How can we use prefix/suffix feature in road names? Hi all, I've compiled two lists using this method: 1) Collect all names in OSM ways with highway=residential from europe.osm.pbf dated 2017-04-04. I've used this commands: osmfilter europe.o5m --ignore-dependencies --keep= --keep-ways="highway=residential" -o=residential_roads.o5m I've created a small java program based on splitter to 2) Collect those names with at least one blank or apostroph ( ' ) 3) For each name: Find position of blank or apostrop, create prefix as substring from start to position and suffix as substring from position to end. Set position to next blank/apostrop. Stop if none found. Each calculated prefix / suffix is counted. Example : "Chemin de Piere Froide" gives prefixes "Chemin", "Chemin de", "Chemin de Piere" and suffixes "de Piere Froide", "Piere Froide", and "Froide" I've printed those strings with > 1000 occurences sorted by highest occurence first. It seems to me that we need some language experts to sort out which of the strings are useful prefix / suffix strings. I am pretty sure that the "prefix" "Rue Jean" 11476 is not a good candidate but others with smaller numbers are okay, e.g. "Rua de" 5324 .... "Route du" 3329 The suffixes with multiple words are probably not useful, at least not in those languages that I know a little bit. Note that my algo is case sensitive. Maybe we can use these lists to set up a list of prefixes and suffixes ? I am now compiling those lists for a planet file from 2017-01-05. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Carlos Dávila <cdavilam@orangecorreo.es> Gesendet: Mittwoch, 12. April 2017 23:08:45 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] How can we use prefix/suffix feature in road names? El 12/04/17 a las 21:48, Steve Ratcliffe escribió:
Hi
There is at least one visible effect of these 0x1e and 0x1f characters: When you zoom out MapSource removes the prefix / suffix part(s) from
In addition there is 0x1b which is like 0x1e, except that it does not act as a space. Only known example is is for "L'" being used as a prefix:
Rue de L'Abbe Vincent
There's also D': Rue D'Aberdeen, Allée D'Albert...
There is also 0x1c which is the non-spacing equivalent of 0x1f, I don't know of any examples of that being used in street names.
Since 0x1e and 0x1f are effectively spaces, I've created a patch to make them sort along with and just after space.
..Steve
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd I already have a list with some (~1000) prefixes for Spanish, Catalan, Galician, French and Portuguese. It was obtained manually, checking the list of roads (not only residential) shown in MapSource address search box for Europe and Brazil maps (if I recall correctly). It's not exactly a list of prefixes, but a set of style rules to detect prefixes, but actual prefixes can be easily extracted from it. If it can help, I can send it to you. El 13/04/17 a las 16:35, Gerd Petermann escribió:
Hi all,
I've compiled two lists using this method: 1) Collect all names in OSM ways with highway=residential from europe.osm.pbf dated 2017-04-04. I've used this commands: osmfilter europe.o5m --ignore-dependencies --keep= --keep-ways="highway=residential" -o=residential_roads.o5m
I've created a small java program based on splitter to 2) Collect those names with at least one blank or apostroph ( ' ) 3) For each name: Find position of blank or apostrop, create prefix as substring from start to position and suffix as substring from position to end. Set position to next blank/apostrop. Stop if none found. Each calculated prefix / suffix is counted. Example : "Chemin de Piere Froide" gives prefixes "Chemin", "Chemin de", "Chemin de Piere" and suffixes "de Piere Froide", "Piere Froide", and "Froide"
I've printed those strings with > 1000 occurences sorted by highest occurence first.
It seems to me that we need some language experts to sort out which of the strings are useful prefix / suffix strings. I am pretty sure that the "prefix" "Rue Jean" 11476 is not a good candidate but others with smaller numbers are okay, e.g. "Rua de" 5324 .... "Route du" 3329
The suffixes with multiple words are probably not useful, at least not in those languages that I know a little bit. Note that my algo is case sensitive.
Maybe we can use these lists to set up a list of prefixes and suffixes ? I am now compiling those lists for a planet file from 2017-01-05.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Carlos Dávila <cdavilam@orangecorreo.es> Gesendet: Mittwoch, 12. April 2017 23:08:45 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] How can we use prefix/suffix feature in road names?
El 12/04/17 a las 21:48, Steve Ratcliffe escribió:
Hi
There is at least one visible effect of these 0x1e and 0x1f characters: When you zoom out MapSource removes the prefix / suffix part(s) from In addition there is 0x1b which is like 0x1e, except that it does not act as a space. Only known example is is for "L'" being used as a prefix:
Rue de L'Abbe Vincent There's also D': Rue D'Aberdeen, Allée D'Albert... There is also 0x1c which is the non-spacing equivalent of 0x1f, I don't know of any examples of that being used in street names.
Since 0x1e and 0x1f are effectively spaces, I've created a patch to make them sort along with and just after space.
..Steve

Hi Carlos, yes, at the moment I am not so much interested in the actual list, but maybe I can learn about special cases. I try to find a format for the data that allows easy use and easy control of the feature. I think I understand the needs for German, English and some Latin based languages but I have no idea about the rest. I have the feeling that we should group the list by language. I assume that the common German prefixes like "Am, An, Auf, Bei, Zum, Zur" should be ignored in the UK. My current thinking : we can set up a file similar to LocatorConfig.xml which contains prefixes and suffixes grouped by language and add some information in LocatorConfig.xml to say which language(s) are used for road names in that country. Do you think that would work? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Carlos Dávila <cdavilam@orangecorreo.es> Gesendet: Donnerstag, 13. April 2017 17:10:12 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] How can we use prefix/suffix feature in road names? Hi Gerd I already have a list with some (~1000) prefixes for Spanish, Catalan, Galician, French and Portuguese. It was obtained manually, checking the list of roads (not only residential) shown in MapSource address search box for Europe and Brazil maps (if I recall correctly). It's not exactly a list of prefixes, but a set of style rules to detect prefixes, but actual prefixes can be easily extracted from it. If it can help, I can send it to you. El 13/04/17 a las 16:35, Gerd Petermann escribió:
Hi all,
I've compiled two lists using this method: 1) Collect all names in OSM ways with highway=residential from europe.osm.pbf dated 2017-04-04. I've used this commands: osmfilter europe.o5m --ignore-dependencies --keep= --keep-ways="highway=residential" -o=residential_roads.o5m
I've created a small java program based on splitter to 2) Collect those names with at least one blank or apostroph ( ' ) 3) For each name: Find position of blank or apostrop, create prefix as substring from start to position and suffix as substring from position to end. Set position to next blank/apostrop. Stop if none found. Each calculated prefix / suffix is counted. Example : "Chemin de Piere Froide" gives prefixes "Chemin", "Chemin de", "Chemin de Piere" and suffixes "de Piere Froide", "Piere Froide", and "Froide"
I've printed those strings with > 1000 occurences sorted by highest occurence first.
It seems to me that we need some language experts to sort out which of the strings are useful prefix / suffix strings. I am pretty sure that the "prefix" "Rue Jean" 11476 is not a good candidate but others with smaller numbers are okay, e.g. "Rua de" 5324 .... "Route du" 3329
The suffixes with multiple words are probably not useful, at least not in those languages that I know a little bit. Note that my algo is case sensitive.
Maybe we can use these lists to set up a list of prefixes and suffixes ? I am now compiling those lists for a planet file from 2017-01-05.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Carlos Dávila <cdavilam@orangecorreo.es> Gesendet: Mittwoch, 12. April 2017 23:08:45 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] How can we use prefix/suffix feature in road names?
El 12/04/17 a las 21:48, Steve Ratcliffe escribió:
Hi
There is at least one visible effect of these 0x1e and 0x1f characters: When you zoom out MapSource removes the prefix / suffix part(s) from In addition there is 0x1b which is like 0x1e, except that it does not act as a space. Only known example is is for "L'" being used as a prefix:
Rue de L'Abbe Vincent There's also D': Rue D'Aberdeen, Allée D'Albert... There is also 0x1c which is the non-spacing equivalent of 0x1f, I don't know of any examples of that being used in street names.
Since 0x1e and 0x1f are effectively spaces, I've created a patch to make them sort along with and just after space.
..Steve
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd,
we can set up a file similar to LocatorConfig.xml which contains prefixes and suffixes grouped by language and add some information in LocatorConfig.xml to say which language(s) are used for road names in that country.
This is a good idea. I can't see the final solution yet, but I have some thoughts: - The list of prefixes/suffixes for each language would be maintained better if it was easy to edit by users. I would prefer it to be a part of style rather then a part of LocatorConfig. - There should be support for multiple languages in a single country. - Would be good to have some support for languages derived form OSM tags, like "name:en", "name:de". - A direct option for mkgmap to set language could be useful. -- Best regards, Andrzej

Hi Gerd, let's add more declaration to option file in style. This could be a block of option for a country and for a language. Each country block would contain command line options and additional declarations valid only for this country. Language block would be a kind of include, merged to country declaration, when "use-language" is applied. For example: country=CAN { name-tag-list=name:en,name:fr,name drive-on=right use-language=en,fr } language=en { x-mdr7-suffix=street,road,way } language=fr { x-mdr7-prefix=avenue,chemin,rue } If options are duplicated, mkgmap should use first command line options, then style and last LocatorConfig. Some options can't be processed as per country value. I think these option could be ignored in country block with a warning only. This would make a style a bit independent of mkgmap version. -- Best regards, Andrzej

Hi Andrzej, the list of prefixes for latin based languages is long, with lots of redundancy, I think we'll see +100 each for french, spanish, italian etc. . Can you explain how the country specific name-list option should work? At the moment, the global option name-list is used to set the name tag for relations, ways and nodes. and - if bounds option is used - the LocationHook - hopefully - sets tag mkgmap:admin_level2 tag for ways and nodes so that rules in lines, polygons and points can evaluate it. If I got you right you think that mkgmap should try to set the name tag after evaluating mkgmap:admin_level2 and before the style rules are evaluated ? By the way : I am not sure if a --name-tag-list option which doesn't start with name is a good idea when it comes to house numbers. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Samstag, 15. April 2017 12:15:56 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] How can we use prefix/suffix feature in road names? Hi Gerd, let's add more declaration to option file in style. This could be a block of option for a country and for a language. Each country block would contain command line options and additional declarations valid only for this country. Language block would be a kind of include, merged to country declaration, when "use-language" is applied. For example: country=CAN { name-tag-list=name:en,name:fr,name drive-on=right use-language=en,fr } language=en { x-mdr7-suffix=street,road,way } language=fr { x-mdr7-prefix=avenue,chemin,rue } If options are duplicated, mkgmap should use first command line options, then style and last LocatorConfig. Some options can't be processed as per country value. I think these option could be ignored in country block with a warning only. This would make a style a bit independent of mkgmap version. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, I didn't think through implementations details, these was an idea what could be done if we get country dependent options. I'm not even sure if name-tag-list would be useful, this was an example. Sorry to divert you from main topic. -- Best regards, Andrzej

Hi all, Continuing Andrzejs proposal I think about the following structure to specify prefixes which are combinations of multiple words: language=es { prefix1 = "Avenida","Avinguda","Carrer","Calle",... prefix2= "de las","de los","de la","dels","del","d'" } language=fr { prefix1 = " prefix2= "de las","de los","de la","dels","d'" } Given this mkgmap would generate all the possible combinations like "Avenida", "Avenida de las", ..., "Calle dels", "Calle d'" If a given road name matches more than one generated prefix, use the longest one. So, "Carrer de las BlaBla" is matched with "Carrer de las" (not with "Carrer de la" or shorter versions) and the next character is a blank which means the blank is replaced by 0x1e. A non blank means that the 0x1b is added after the prefix . I also think that the matching should be done with case-insensitive search so that typos like "CArrer de las" or "Carrer de Las" are all changed to "Carrer de las". If I got that right that is one goal of the rules in name_movedend provided by Carlos. I am now implementing something like that, please let me know soon if you see problems with these ideas. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Dienstag, 18. April 2017 15:16:38 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] How can we use prefix/suffix feature in road names? Hi Gerd, I didn't think through implementations details, these was an idea what could be done if we get country dependent options. I'm not even sure if name-tag-list would be useful, this was an example. Sorry to divert you from main topic. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

... sorry, please ignore the block with language=fr. I am not yet sure how to handle the blanks in those strings, so don't worry about the syntax for now. Gerd ________________________________________ Von: Gerd Petermann Gesendet: Mittwoch, 19. April 2017 08:57:13 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: AW: [mkgmap-dev] How can we use prefix/suffix feature in road names? Hi all, Continuing Andrzejs proposal I think about the following structure to specify prefixes which are combinations of multiple words: language=es { prefix1 = "Avenida","Avinguda","Carrer","Calle",... prefix2= "de las","de los","de la","dels","del","d'" } language=fr { prefix1 = " prefix2= "de las","de los","de la","dels","d'" } Given this mkgmap would generate all the possible combinations like "Avenida", "Avenida de las", ..., "Calle dels", "Calle d'" If a given road name matches more than one generated prefix, use the longest one. So, "Carrer de las BlaBla" is matched with "Carrer de las" (not with "Carrer de la" or shorter versions) and the next character is a blank which means the blank is replaced by 0x1e. A non blank means that the 0x1b is added after the prefix . I also think that the matching should be done with case-insensitive search so that typos like "CArrer de las" or "Carrer de Las" are all changed to "Carrer de las". If I got that right that is one goal of the rules in name_movedend provided by Carlos. I am now implementing something like that, please let me know soon if you see problems with these ideas. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Dienstag, 18. April 2017 15:16:38 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] How can we use prefix/suffix feature in road names? Hi Gerd, I didn't think through implementations details, these was an idea what could be done if we get country dependent options. I'm not even sure if name-tag-list would be useful, this was an example. Sorry to divert you from main topic. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (5)
-
Andrzej Popowski
-
Carlos Dávila
-
Gerd Petermann
-
Steve Ratcliffe
-
Ticker Berkin