logo separator

[mkgmap-dev] tag test "start with"

From Ben benedikt at cortado.de on Wed Nov 25 23:21:15 GMT 2009

Thanks, Thilo!

that worked (almost) straight away.
I just needed to add an equation to start with:

name=* & name ~ 'T.*' {name '${name}'} [0x6501 level 4]

Happy mapping,

Thilo Hannemann wrote:
> Hi Ben,
> perhaps it is not really obvious from the documentation, but you can use regular expressions. The syntax would be
> name ~ 'T.*'
> for example. Note the .* instead of a single *, this is a "proper" regexp and not the simplified version. For reference I would suggest something like http://java.sun.com/docs/books/tutorial/essential/regex/, but I'm not sure if everything works in mkgmap that is described there.
> Regards
> Thilo
> Am 25.11.2009 um 13:21 schrieb Ben:
>> Hi mkgmap gurus,
>> Im currently trying to convert some POI lists into img format with mkgmap.
>> Depending on the first character of the POI name, different actions 
>> should be performed.
>> I tried the following:
>> name=T* {name '${name}'} [0x0101 level 4]
>> name=M* {name '${name}'} [0x0102 level 4]
>> name=E* {name '${name}'} [0x0103 level 4]
>> what results in the error message
>> "Error in style: Error: (points:1): Stack size is 2
>> Could not open style null"
>> As far as I understand the syntax, I can only test tags for equality, 
>> not if they contain certain strings.
>> Does anyone have a good idea idea for how to achieve the desired 
>> differentiation?
>> Thanks,
>> Ben
>> _______________________________________________
>> mkgmap-dev mailing list
>> mkgmap-dev at lists.mkgmap.org.uk
>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

More information about the mkgmap-dev mailing list