logo separator

[mkgmap-dev] [PATCH v1] exclude words from city / state

From WanMil wmgcnfg at web.de on Wed Dec 7 20:03:07 GMT 2011

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
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: style_removefilter_v1.patch
Type: text/x-patch
Size: 2277 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20111207/d1428c5f/attachment.bin 


More information about the mkgmap-dev mailing list