exclude words from city / state

Using the locator branch, I noticed that many cities in Austria are not findable anymore. The problem is that there are words like "Gemeinde Mödling" or "Bezirk Mödling" or "county XYZ". There should be a list where one can enter words that get deleted. That is because for the boundary it is the correct name, but not for searching a street. Also there are problems in Austria in Vienna. Vienna is a state and a city, and ideally it should be possible to enter either the district or the city into the city field, in order to find a street. Currently it is not possible to properly separate cities outside Vienna from districts inside Vienna, as they have the same admin_level. But for the ise tags, there is a correct specification telling you that districts are not cities (from the standpoint of the admin_level, it is correct however to classify them the same as small cities outside of Vienna). So in effect if one does not enter specific rules for Vienna, address search can never work as expected. Admin_level was never intended to be used for address searching, hence taking it is flawed and will not provide correct results. Ise is intended for address searching, but mkgmap does not use it. In general after using the locator branch, I more and more think, that the whole matching is completly the wrong way of doing. Much better to support real addresses as entered in OSM, and not do so much guessing. Especially support housenumbers, as at least in Germany and Austria housenumbers including full ise tags are becoming the norm, and not the exception. Only footways, pathes, or tracks should be matched, as they usually have no real address - but then it's rare that one searches for a specific path/track/footway, only real use would therefore be

Using the locator branch, I noticed that many cities in Austria are not findable anymore. The problem is that there are words like "Gemeinde Mödling" or "Bezirk Mödling" or "county XYZ". There should be a list where one can enter words that get deleted. That is because for the boundary it is the correct name, but not for searching a street.
Also there are problems in Austria in Vienna. Vienna is a state and a city, and ideally it should be possible to enter either the district or the city into the city field, in order to find a street. Currently it is not possible to properly separate cities outside Vienna from districts inside Vienna, as they have the same admin_level. But for the ise tags, there is a correct specification telling you that districts are not cities (from the standpoint of the admin_level, it is correct however to classify them the same as small cities outside of Vienna). So in effect if one does not enter specific rules for Vienna, address search can never work as expected. Admin_level was never intended to be used for address searching, hence taking it is flawed and will not provide correct results. Ise is intended for address searching, but mkgmap does not use it.
In general after using the locator branch, I more and more think, that the whole matching is completly the wrong way of doing. Much better to support real addresses as entered in OSM, and not do so much guessing. Especially support housenumbers, as at least in Germany and Austria housenumbers including full ise tags are becoming the norm, and not the exception. Only footways, pathes, or tracks should be matched, as they usually have no real address - but then it's rare that one searches for a specific path/track/footway, only real use would therefore be
Felix, I understand that you are no longer interested in. Anyhow the mkgmap source code contains a SubstitutionFilter class which performs some string replacements. This should work to replace and to remove common words. I don't know how this filter can be configured in the style file but maybe someone else remembers. WanMil

On 22.05.2011 20:47, WanMil wrote:
Using the locator branch, I noticed that many cities in Austria are not findable anymore. The problem is that there are words like "Gemeinde Mödling" or "Bezirk Mödling" or "county XYZ". There should be a list where one can enter words that get deleted. That is because for the boundary it is the correct name, but not for searching a street.
Also there are problems in Austria in Vienna. Vienna is a state and a city, and ideally it should be possible to enter either the district or the city into the city field, in order to find a street. Currently it is not possible to properly separate cities outside Vienna from districts inside Vienna, as they have the same admin_level. But for the ise tags, there is a correct specification telling you that districts are not cities (from the standpoint of the admin_level, it is correct however to classify them the same as small cities outside of Vienna). So in effect if one does not enter specific rules for Vienna, address search can never work as expected. Admin_level was never intended to be used for address searching, hence taking it is flawed and will not provide correct results. Ise is intended for address searching, but mkgmap does not use it.
In general after using the locator branch, I more and more think, that the whole matching is completly the wrong way of doing. Much better to support real addresses as entered in OSM, and not do so much guessing. Especially support housenumbers, as at least in Germany and Austria housenumbers including full ise tags are becoming the norm, and not the exception. Only footways, pathes, or tracks should be matched, as they usually have no real address - but then it's rare that one searches for a specific path/track/footway, only real use would therefore be
Felix,
I understand that you are no longer interested in. Well it is not that I am not interested at all in it. But I don't think it is a good way to do in the long run. It will never yield better 90% accuracy, and it stops people mapping correctly (real addresses) and it might promote people to map boundaries wrongly, in order to get addresses right (like some years ago people retagging highway=path because Osmarender and the dreaded Opencyclemap would not render them and thereby causing a widely spread misconception of understanding the "Do not tag for renderers" into "Map as you like, it does not have to be readable in a consistent form, renderers should be creative and intelligent in understanding what my custom tagging means").
I hope, maybe at least by using "add" instead of "set" the current way can be enhanced, but the fact that the current locator branch destructs and thus renders invalid correct addresses is a real nogo for me (and shouldn't be promoted by such a popular tool like mkgmap). Using the trunk, I can find about 90% of streets in Austria (tested in cities and countryside) in the correct city, with locator this drops to less than 10% as boundary name for a city is in most cases different from address name of a city. Also I think searching for routes, footways, pathes or tracks is indeed an important feature, where the current locator branch approach is the best method (just the problem that the name of a boundary, is not the name of the address persists and is really bad - at least in Austria in my eyes it makes the city choice nearly unusable).
Anyhow the mkgmap source code contains a SubstitutionFilter class which performs some string replacements. This should work to replace and to remove common words.
Okay, I'll see if I can understand how it works. BTW will right now test why the locator branch crashes on some countries for me, while the normal mkgmap trunk processes them in a matter of <30 seconds. Maybe I got the pbf support wrong (by including outdated/future libs???).
I don't know how this filter can be configured in the style file but maybe someone else remembers.
WanMil

Using the locator branch, I noticed that many cities in Austria are not findable anymore. The problem is that there are words like "Gemeinde Mödling" or "Bezirk Mödling" or "county XYZ". There should be a list where one can enter words that get deleted. That is because for the boundary it is the correct name, but not for searching a street.
Also there are problems in Austria in Vienna. Vienna is a state and a city, and ideally it should be possible to enter either the district or the city into the city field, in order to find a street. Currently it is not possible to properly separate cities outside Vienna from districts inside Vienna, as they have the same admin_level. But for the ise tags, there is a correct specification telling you that districts are not cities (from the standpoint of the admin_level, it is correct however to classify them the same as small cities outside of Vienna). So in effect if one does not enter specific rules for Vienna, address search can never work as expected. Admin_level was never intended to be used for address searching, hence taking it is flawed and will not provide correct results. Ise is intended for address searching, but mkgmap does not use it.
In general after using the locator branch, I more and more think, that the whole matching is completly the wrong way of doing. Much better to support real addresses as entered in OSM, and not do so much guessing. Especially support housenumbers, as at least in Germany and Austria housenumbers including full ise tags are becoming the norm, and not the exception. Only footways, pathes, or tracks should be matched, as they usually have no real address - but then it's rare that one searches for a specific path/track/footway, only real use would therefore be
Felix,
I understand that you are no longer interested in. Well it is not that I am not interested at all in it. But I don't think it is a good way to do in the long run. It will never yield better 90% accuracy, and it stops people mapping correctly (real addresses) and it might promote people to map boundaries wrongly, in order to get addresses right (like some years ago people retagging highway=path because Osmarender and the dreaded Opencyclemap would not render them and thereby causing a widely spread misconception of understanding the "Do not tag for renderers" into "Map as you like, it does not have to be readable in a consistent form, renderers should be creative and intelligent in understanding what my custom tagging means").
I hope, maybe at least by using "add" instead of "set" the current way can be enhanced, but the fact that the current locator branch destructs and thus renders invalid correct addresses is a real nogo for me (and shouldn't be promoted by such a popular tool like mkgmap).
Using the trunk, I can find about 90% of streets in Austria (tested in cities and countryside) in the correct city, with locator this drops to less than 10% as boundary name for a city is in most cases different from address name of a city.
Also I think searching for routes, footways, pathes or tracks is indeed an important feature, where the current locator branch approach is the best method (just the problem that the name of a boundary, is not the name of the address persists and is really bad - at least in Austria in my eyes it makes the city choice nearly unusable).
That's where the style system comes into play. If you don't want to use the boundaries you don't have to. Maybe it does not work perfectly at the moment but it is a branch. If the majority of the list doesn't like it at the *end* of development we can trash it. It's just a study if it improves mkgmap. And in the end it's open source so you can contribute with source code *any* time if you think you can improve parts of it.
Anyhow the mkgmap source code contains a SubstitutionFilter class which performs some string replacements. This should work to replace and to remove common words.
Okay, I'll see if I can understand how it works.
BTW will right now test why the locator branch crashes on some countries for me, while the normal mkgmap trunk processes them in a matter of<30 seconds. Maybe I got the pbf support wrong (by including outdated/future libs???).
I don't know how this filter can be configured in the style file but maybe someone else remembers.
WanMil

the following 2 pieces of code in the lines file should do the same thing: set the name for the route and then delete it. the 1st one works as expected, the 2nd one sets the name but delete is not executed. am i doing anything wrong or is that a bug? mkgmap:route-transport=* & mkgmap:route-bike=* { name '${mkgmap:route-transport}, ${mkgmap:route-bike}' } [0x10803 resolution 24 continue] mkgmap:route-transport=* & mkgmap:route-bike=* { delete mkgmap:route-transport; delete mkgmap:route-bike } mkgmap:route-transport=* & mkgmap:route-bike=* { name '${mkgmap:route-transport}, ${mkgmap:route-bike; delete mkgmap:route-transport; delete mkgmap:route-bike}' } [0x10803 resolution 24 continue]

On 22.05.2011 21:21, michael lohr wrote:
the following 2 pieces of code in the lines file should do the same thing: set the name for the route and then delete it. the 1st one works as expected, the 2nd one sets the name but delete is not executed. am i doing anything wrong or is that a bug?
mkgmap:route-transport=*& mkgmap:route-bike=* { name '${mkgmap:route-transport}, ${mkgmap:route-bike}' } [0x10803 resolution 24 continue] mkgmap:route-transport=*& mkgmap:route-bike=* { delete mkgmap:route-transport; delete mkgmap:route-bike }
mkgmap:route-transport=*& mkgmap:route-bike=* { name '${mkgmap:route-transport}, ${mkgmap:route-bike; delete mkgmap:route-transport; delete mkgmap:route-bike}' } [0x10803 resolution 24 continue] you have to use continue with_actions if you want the action to be carried forward. The result is expected (better use 2 lines, or you might get confused by what does what).

I noticed that level 8 boundaries in Germany use the name of the city, and that lavel 8 boundaries in Austria always have the prefix 'Gemeinde' in the name before the name of the city. That prefix is in my opinion obsolete information. Using a Garmin one always needs to type this prefix 'Gemeinde'. Does anyone know hoe we can get rid of typing this prefix in Garmin devices? Cheers, Johan On Sun, 22 May 2011 21:09:25 +0200, WanMil wrote:
Using the locator branch, I noticed that many cities in Austria are not findable anymore. The problem is that there are words like "Gemeinde Mödling" or "Bezirk Mödling" or "county XYZ". There should be a list where one can enter words that get deleted. That is because for the boundary it is the correct name, but not for searching a street.
Also there are problems in Austria in Vienna. Vienna is a state and a city, and ideally it should be possible to enter either the district or the city into the city field, in order to find a street. Currently it is not possible to properly separate cities outside Vienna from districts inside Vienna, as they have the same admin_level. But for the ise tags, there is a correct specification telling you that districts are not cities (from the standpoint of the admin_level, it is correct however to classify them the same as small cities outside of Vienna). So in effect if one does not enter specific rules for Vienna, address search can never work as expected. Admin_level was never intended to be used for address searching, hence taking it is flawed and will not provide correct results. Ise is intended for address searching, but mkgmap does not use it.
In general after using the locator branch, I more and more think, that the whole matching is completly the wrong way of doing. Much better to support real addresses as entered in OSM, and not do so much guessing. Especially support housenumbers, as at least in Germany and Austria housenumbers including full ise tags are becoming the norm, and not the exception. Only footways, pathes, or tracks should be matched, as they usually have no real address - but then it's rare that one searches for a specific path/track/footway, only real use would therefore be
Felix,
I understand that you are no longer interested in. Well it is not that I am not interested at all in it. But I don't think it is a good way to do in the long run. It will never yield better 90% accuracy, and it stops people mapping correctly (real addresses) and it might promote people to map boundaries wrongly, in order to get addresses right (like some years ago people retagging highway=path because Osmarender and the dreaded Opencyclemap would not render them and thereby causing a widely spread misconception of understanding the "Do not tag for renderers" into "Map as you like, it does not have to be readable in a consistent form, renderers should be creative and intelligent in understanding what my custom tagging means").
I hope, maybe at least by using "add" instead of "set" the current way can be enhanced, but the fact that the current locator branch destructs and thus renders invalid correct addresses is a real nogo for me (and shouldn't be promoted by such a popular tool like mkgmap).
Using the trunk, I can find about 90% of streets in Austria (tested in cities and countryside) in the correct city, with locator this drops to less than 10% as boundary name for a city is in most cases different from address name of a city.
Also I think searching for routes, footways, pathes or tracks is indeed an important feature, where the current locator branch approach is the best method (just the problem that the name of a boundary, is not the name of the address persists and is really bad - at least in Austria in my eyes it makes the city choice nearly unusable).
That's where the style system comes into play. If you don't want to use the boundaries you don't have to. Maybe it does not work perfectly at the moment but it is a branch. If the majority of the list doesn't like it at the *end* of development we can trash it. It's just a study if it improves mkgmap. And in the end it's open source so you can contribute with source code *any* time if you think you can improve parts of it.
Anyhow the mkgmap source code contains a SubstitutionFilter class which performs some string replacements. This should work to replace and to remove common words.
Okay, I'll see if I can understand how it works.
BTW will right now test why the locator branch crashes on some countries for me, while the normal mkgmap trunk processes them in a matter of<30 seconds. Maybe I got the pbf support wrong (by including outdated/future libs???).
I don't know how this filter can be configured in the style file but maybe someone else remembers.
WanMil
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi, the style system provides a substitution filter which can remove the 'Gemeinde' prefix: The following rule from the locator branch is expanded with "|subst:Gemeinde ": mkgmap:country=AUT & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' } The subst value filter searches for "Gemeinde " (I also want to remove the whitespace at the end) and replaces that with an empty string. If you want to replace that with something else you can build a rule like: ${mkgmap:admin_level8|subst:Gemeinde =>City } This replaces "Gemeinde " with "City ". Maybe we should create a similar filter that is more comfortable and optimized for removing multiple prefixed strings and/or postfixed strings. Please send your ideas. WanMil
I noticed that level 8 boundaries in Germany use the name of the city, and that lavel 8 boundaries in Austria always have the prefix 'Gemeinde' in the name before the name of the city. That prefix is in my opinion obsolete information. Using a Garmin one always needs to type this prefix 'Gemeinde'. Does anyone know hoe we can get rid of typing this prefix in Garmin devices?
Cheers, Johan
On Sun, 22 May 2011 21:09:25 +0200, WanMil wrote:
Using the locator branch, I noticed that many cities in Austria are not findable anymore. The problem is that there are words like "Gemeinde Mödling" or "Bezirk Mödling" or "county XYZ". There should be a list where one can enter words that get deleted. That is because for the boundary it is the correct name, but not for searching a street.
Also there are problems in Austria in Vienna. Vienna is a state and a city, and ideally it should be possible to enter either the district or the city into the city field, in order to find a street. Currently it is not possible to properly separate cities outside Vienna from districts inside Vienna, as they have the same admin_level. But for the ise tags, there is a correct specification telling you that districts are not cities (from the standpoint of the admin_level, it is correct however to classify them the same as small cities outside of Vienna). So in effect if one does not enter specific rules for Vienna, address search can never work as expected. Admin_level was never intended to be used for address searching, hence taking it is flawed and will not provide correct results. Ise is intended for address searching, but mkgmap does not use it.
In general after using the locator branch, I more and more think, that the whole matching is completly the wrong way of doing. Much better to support real addresses as entered in OSM, and not do so much guessing. Especially support housenumbers, as at least in Germany and Austria housenumbers including full ise tags are becoming the norm, and not the exception. Only footways, pathes, or tracks should be matched, as they usually have no real address - but then it's rare that one searches for a specific path/track/footway, only real use would therefore be
Felix,
I understand that you are no longer interested in. Well it is not that I am not interested at all in it. But I don't think it is a good way to do in the long run. It will never yield better 90% accuracy, and it stops people mapping correctly (real addresses) and it might promote people to map boundaries wrongly, in order to get addresses right (like some years ago people retagging highway=path because Osmarender and the dreaded Opencyclemap would not render them and thereby causing a widely spread misconception of understanding the "Do not tag for renderers" into "Map as you like, it does not have to be readable in a consistent form, renderers should be creative and intelligent in understanding what my custom tagging means").
I hope, maybe at least by using "add" instead of "set" the current way can be enhanced, but the fact that the current locator branch destructs and thus renders invalid correct addresses is a real nogo for me (and shouldn't be promoted by such a popular tool like mkgmap).
Using the trunk, I can find about 90% of streets in Austria (tested in cities and countryside) in the correct city, with locator this drops to less than 10% as boundary name for a city is in most cases different from address name of a city.
Also I think searching for routes, footways, pathes or tracks is indeed an important feature, where the current locator branch approach is the best method (just the problem that the name of a boundary, is not the name of the address persists and is really bad - at least in Austria in my eyes it makes the city choice nearly unusable).
That's where the style system comes into play. If you don't want to use the boundaries you don't have to. Maybe it does not work perfectly at the moment but it is a branch. If the majority of the list doesn't like it at the *end* of development we can trash it. It's just a study if it improves mkgmap. And in the end it's open source so you can contribute with source code *any* time if you think you can improve parts of it.
Anyhow the mkgmap source code contains a SubstitutionFilter class which performs some string replacements. This should work to replace and to remove common words.
Okay, I'll see if I can understand how it works.
BTW will right now test why the locator branch crashes on some countries for me, while the normal mkgmap trunk processes them in a matter of<30 seconds. Maybe I got the pbf support wrong (by including outdated/future libs???).
I don't know how this filter can be configured in the style file but maybe someone else remembers.
WanMil
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

Thanks, works great! I have no ideas yet to further improve the filter function. On Sat, 23 Jul 2011 14:14:43 +0200, WanMil wrote:
Hi,
the style system provides a substitution filter which can remove the 'Gemeinde' prefix:
The following rule from the locator branch is expanded with "|subst:Gemeinde ": mkgmap:country=AUT & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' }
The subst value filter searches for "Gemeinde " (I also want to remove the whitespace at the end) and replaces that with an empty string. If you want to replace that with something else you can build a rule like: ${mkgmap:admin_level8|subst:Gemeinde =>City } This replaces "Gemeinde " with "City ".
Maybe we should create a similar filter that is more comfortable and optimized for removing multiple prefixed strings and/or postfixed strings. Please send your ideas.
WanMil
I noticed that level 8 boundaries in Germany use the name of the city, and that lavel 8 boundaries in Austria always have the prefix 'Gemeinde' in the name before the name of the city. That prefix is in my opinion obsolete information. Using a Garmin one always needs to type this prefix 'Gemeinde'. Does anyone know hoe we can get rid of typing this prefix in Garmin devices?
Cheers, Johan
On Sun, 22 May 2011 21:09:25 +0200, WanMil wrote:
Using the locator branch, I noticed that many cities in Austria are not findable anymore. The problem is that there are words like "Gemeinde Mödling" or "Bezirk Mödling" or "county XYZ". There should be a list where one can enter words that get deleted. That is because for the boundary it is the correct name, but not for searching a street.
Also there are problems in Austria in Vienna. Vienna is a state and a city, and ideally it should be possible to enter either the district or the city into the city field, in order to find a street. Currently it is not possible to properly separate cities outside Vienna from districts inside Vienna, as they have the same admin_level. But for the ise tags, there is a correct specification telling you that districts are not cities (from the standpoint of the admin_level, it is correct however to classify them the same as small cities outside of Vienna). So in effect if one does not enter specific rules for Vienna, address search can never work as expected. Admin_level was never intended to be used for address searching, hence taking it is flawed and will not provide correct results. Ise is intended for address searching, but mkgmap does not use it.
In general after using the locator branch, I more and more think, that the whole matching is completly the wrong way of doing. Much better to support real addresses as entered in OSM, and not do so much guessing. Especially support housenumbers, as at least in Germany and Austria housenumbers including full ise tags are becoming the norm, and not the exception. Only footways, pathes, or tracks should be matched, as they usually have no real address - but then it's rare that one searches for a specific path/track/footway, only real use would therefore be
Felix,
I understand that you are no longer interested in. Well it is not that I am not interested at all in it. But I don't think it is a good way to do in the long run. It will never yield better 90% accuracy, and it stops people mapping correctly (real addresses) and it might promote people to map boundaries wrongly, in order to get addresses right (like some years ago people retagging highway=path because Osmarender and the dreaded Opencyclemap would not render them and thereby causing a widely spread misconception of understanding the "Do not tag for renderers" into "Map as you like, it does not have to be readable in a consistent form, renderers should be creative and intelligent in understanding what my custom tagging means").
I hope, maybe at least by using "add" instead of "set" the current way can be enhanced, but the fact that the current locator branch destructs and thus renders invalid correct addresses is a real nogo for me (and shouldn't be promoted by such a popular tool like mkgmap).
Using the trunk, I can find about 90% of streets in Austria (tested in cities and countryside) in the correct city, with locator this drops to less than 10% as boundary name for a city is in most cases different from address name of a city.
Also I think searching for routes, footways, pathes or tracks is indeed an important feature, where the current locator branch approach is the best method (just the problem that the name of a boundary, is not the name of the address persists and is really bad - at least in Austria in my eyes it makes the city choice nearly unusable).
That's where the style system comes into play. If you don't want to use the boundaries you don't have to. Maybe it does not work perfectly at the moment but it is a branch. If the majority of the list doesn't like it at the *end* of development we can trash it. It's just a study if it improves mkgmap. And in the end it's open source so you can contribute with source code *any* time if you think you can improve parts of it.
Anyhow the mkgmap source code contains a SubstitutionFilter class which performs some string replacements. This should work to replace and to remove common words.
Okay, I'll see if I can understand how it works.
BTW will right now test why the locator branch crashes on some countries for me, while the normal mkgmap trunk processes them in a matter of<30 seconds. Maybe I got the pbf support wrong (by including outdated/future libs???).
I don't know how this filter can be configured in the style file but maybe someone else remembers.
WanMil
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

How is it possible to substitute more than one word ? I have something like this as names in "admin_level=8": "Gemeinde Spalt" "Gemeinde Maxdorf" "Stadt Linz am Rhein" "Stadt Rodgau" I want to replace "Gemeinde " and "Stadt " with nothing. How is it possible to combine: mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' } and mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Stadt }' } Regards Klaus -- View this message in context: http://gis.638310.n2.nabble.com/exclude-words-from-city-state-tp6383160p7067... Sent from the Mkgmap Development mailing list archive at Nabble.com.

On Tue, Dec 06, toc-rox wrote:
How is it possible to substitute more than one word ?
I have something like this as names in "admin_level=8": "Gemeinde Spalt" "Gemeinde Maxdorf" "Stadt Linz am Rhein" "Stadt Rodgau"
I want to replace "Gemeinde " and "Stadt " with nothing. How is it possible to combine: mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' } and mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Stadt }' }
I only know a way how to do it with three (untested yet): mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8~'Gemeinde.*' { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' } mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8~'Stadt.*' { set mkgmap:city='${mkgmap:admin_level8|subst:Stadt }' } mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' } which will create a huge amount of additional rules ... Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

Attached patch does the trick easier: mkgmap:country=DEU& mkgmap:city!=* { set mkgmap:city='${mkgmap:admin_level8|remove:Gemeinde !Stadt }' } The filter "remove" removes all occurrences of the defined regexp. Regexps are separated by "!". Please have a try. Maybe someone has a better idea for the separator character? WanMil
On Tue, Dec 06, toc-rox wrote:
How is it possible to substitute more than one word ?
I have something like this as names in "admin_level=8": "Gemeinde Spalt" "Gemeinde Maxdorf" "Stadt Linz am Rhein" "Stadt Rodgau"
I want to replace "Gemeinde " and "Stadt " with nothing. How is it possible to combine: mkgmap:country=DEU& mkgmap:city!=*& mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' } and mkgmap:country=DEU& mkgmap:city!=*& mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Stadt }' }
I only know a way how to do it with three (untested yet):
mkgmap:country=DEU& mkgmap:city!=*& mkgmap:admin_level8~'Gemeinde.*' { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' } mkgmap:country=DEU& mkgmap:city!=*& mkgmap:admin_level8~'Stadt.*' { set mkgmap:city='${mkgmap:admin_level8|subst:Stadt }' } mkgmap:country=DEU& mkgmap:city!=*& mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' }
which will create a huge amount of additional rules ...
Thorsten

On Wed, Dec 07, WanMil wrote:
Attached patch does the trick easier:
mkgmap:country=DEU& mkgmap:city!=* { set mkgmap:city='${mkgmap:admin_level8|remove:Gemeinde !Stadt }' }
The filter "remove" removes all occurrences of the defined regexp. Regexps are separated by "!".
Please have a try. Maybe someone has a better idea for the separator character?
Big thanks! Works fine and makes the rules better maintain- and readable. The standard seperators are "|", "/", ";". I like everybody of them more than "!", which is really uncommon. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

On 06/12/11 15:22, toc-rox wrote:
I want to replace "Gemeinde " and "Stadt " with nothing. How is it possible to combine: mkgmap:country=DEU& mkgmap:city!=*& mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' } and mkgmap:country=DEU& mkgmap:city!=*& mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Stadt }' }
It is possible to have many modifiers, so you can just combine them both in the same expression: ${mkgmap:admin_level8|subst:Gemeinde |subst:Stadt } ..Steve

On Thu, Dec 08, Steve Ratcliffe wrote:
On 06/12/11 15:22, toc-rox wrote:
I want to replace "Gemeinde " and "Stadt " with nothing. How is it possible to combine: mkgmap:country=DEU& mkgmap:city!=*& mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' } and mkgmap:country=DEU& mkgmap:city!=*& mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Stadt }' }
It is possible to have many modifiers, so you can just combine them both in the same expression:
${mkgmap:admin_level8|subst:Gemeinde |subst:Stadt }
Ok, that's works, too, and doesn't need a patched mkgmap. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

On 06/12/11 15:22, toc-rox wrote:
I want to replace "Gemeinde " and "Stadt " with nothing. How is it possible to combine: mkgmap:country=DEU& mkgmap:city!=*& mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' } and mkgmap:country=DEU& mkgmap:city!=*& mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Stadt }' }
It is possible to have many modifiers, so you can just combine them both in the same expression:
${mkgmap:admin_level8|subst:Gemeinde |subst:Stadt }
..Steve
Great! So the patch is obsolete. WanMil

The following suggestions are tested and are working fine: 1. (Thorsten) mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8~'Gemeinde.*' { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' } mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8~'Stadt.*' { set mkgmap:city='${mkgmap:admin_level8|subst:Stadt }' } mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' } 2. (Steve) ${mkgmap:admin_level8|subst:Gemeinde |subst:Stadt } Thanks to Thorsten and Steve - I intend to use the last. Klaus @WanMil: I haven't tested your solution - but thanks for providing it. -- View this message in context: http://gis.638310.n2.nabble.com/exclude-words-from-city-state-tp6383160p7078... Sent from the Mkgmap Development mailing list archive at Nabble.com.

On Fri, Dec 09, 2011 at 06:29:37AM -0800, toc-rox wrote:
The following suggestions are tested and are working fine:
1. (Thorsten) mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8~'Gemeinde.*' { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' } mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8~'Stadt.*' { set mkgmap:city='${mkgmap:admin_level8|subst:Stadt }' } mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde }' }
2. (Steve) ${mkgmap:admin_level8|subst:Gemeinde |subst:Stadt }
Thanks to Thorsten and Steve - I intend to use the last.
Would it make sense to include this in the default style? I think that it should be something like this (no need for the regexps): mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8=* {set mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde |subst:Stadt }'} Best regards, Marko

I don't think so because the searchstring is "Stadt ". But I'm not sure if there are other false positives so I think it would be better to fix these things in osm-data with name:prefix. Henning

On Sat, Dec 10, Minko wrote:
Perhaps Neustadt an der .... ? Or is it case sensitive?
I guess it is case sensitive, Neustadt an der ... and Halberstadt are still available. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

On Sat, Dec 10, 2011 at 11:05:32AM +0100, Henning Scholland wrote:
I don't think so because the searchstring is "Stadt ". But I'm not sure if there are other false positives so I think it would be better to fix these things in osm-data with name:prefix.
You hopefully mean short_name and short_name:*. Marko

No, I think in Germany we are using for "Stadt Erfurt" name=Erfurt name:prefix=Stadt. Henning Am 10.12.2011 12:55, schrieb Marko Mäkelä:
On Sat, Dec 10, 2011 at 11:05:32AM +0100, Henning Scholland wrote:
I don't think so because the searchstring is "Stadt ". But I'm not sure if there are other false positives so I think it would be better to fix these things in osm-data with name:prefix. You hopefully mean short_name and short_name:*.
Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Here some stats: Germany, admin_level 8, name prefix: "Gemeinde " = 658x (!) "Stadt " = 67 Austria, admin_level 8, name prefix: "Gemeinde " = 1925x (!) My recommendation: - "Gemeinde " should be removed by default for germany and austria - "Stadt " should be corrected by the mappers Klaus -- View this message in context: http://gis.638310.n2.nabble.com/exclude-words-from-city-state-tp6383160p7081... Sent from the Mkgmap Development mailing list archive at Nabble.com.
participants (10)
-
Felix Hartmann
-
Henning Scholland
-
Marko Mäkelä
-
michael lohr
-
Minko
-
navmaps
-
Steve Ratcliffe
-
Thorsten Kukuk
-
toc-rox
-
WanMil