logo separator

[mkgmap-dev] variable substitution in relation members

From Charlie Ferrero charlie at cferrero.net on Tue Dec 22 10:02:47 GMT 2009


Clinton Gladstone wrote:
> On Dec 21, 2009, at 20:20, Marko Mäkelä wrote:
> 
>> I believe that the special name:* handling would be best implemented in
>> a special mkgmap option.  I would try to avoid writing language suffixes
>> in style files.  
> 
> The question of the logical comparisons is to avoid redundancies, some of which may not be related to the language. An example would be if the name and the ref of a road are identical: if so, only one, not both, should be set for the name.
> 
>>> Earlier, i submitted a patch which introduced a not-equal filter which
>>> did this for me, but the patch was never committed: it would be great
>>> if there was a standard solution for this.
>> Would the not-equal filter be used something like this:
>>
>> name '${name} (${name:LANG|ne:${name}}) | ${name}'
> 
> Here is an example from my style file:
> 
> place=* {name '${name} (${name:en|not-equal:name})' | '${name} (${int_name|not-equal:name})' | '${name} (${name:zh_py|not-equal:name})'  | '${name}' }
> 
> This will place one of the following values in parenthesis after the name, as long as the value is not identical to the name:
> 
> - The English name
> - The international name
> - The Pinyin romanization of the name (useful for place names in China)
> 
> As you can see, the intent is to add multilingual values to the map. As in the case of the international name, the name chosen is not necessarily specific to a certain language.
> 
Just to point out that someone else has been working on a front-end 
transliterator for OSM data to be processed in mkgmap:
http://forum.openstreetmap.org/viewtopic.php?id=5554

--
Charlie



More information about the mkgmap-dev mailing list