> Hi all, I have create a poi database with osmosis, but I need to use
> TagTransform in order to the tags be on spanish for my application...Is
> there any place where I can find it so that I dont need to create it
> manually? Because I notice that there are a lots of osm tags,
I haven't worked with POIs and don't even know what it is, in OSM
context, but I do similar tasks of selecting narrow zones (cities) and
building Garmin maps from it using Russian or English names where
possible. Shortly, my tactics is this: I read nodes and ways and pick
names according to language list I need, in order of priority which is
important/suitable for me.
For example, for Greek cities, I pick name:en (English), then
name:el (Greek), then int_name (internationally recognizable name),
then name:ru (Russian). If a node has English name I pick it. If it
hasn't I pick Greek. If it hasn't I pick int_name. And so on. Output
contains nodes and ways with names in language which has highest
priority to me.
Example translations XML is attached. I would be appreciated if
someone review it and suggest how to make it simplier.
<?xml version="1.0" encoding="UTF-8"?>
<translations>
<!--
Consequently use names in different languages as final names for entities.
In this order of precedence:
- name:en
- name:el
- int_name
- name:ru
In case no suitable name found, revert to plain "name" tag, if it exists.
-->
<translation>
<name>Save plain name for later use</name>
<description>Kavala - Save plain name for later use if no following searches succeed.</description>
<match>
<tag k="^name$" v=".*" match_id="myname"/>
</match>
<output>
<copy-unmatched/>
<tag k="saved_name" from_match="myname" v="{0}"/>
</output>
</translation>
<translation>
<name>Narrow tags set to ones that of a use for us</name>
<description>Kavala - Remove all names which we don't need. Also copy all tags which aren't names.</description>
<match>
<tag k="^(?!name:\w+|name).*$" v=".*"/>
</match>
<find>
<tag k="name:en" v=".*"/>
<tag k="name:el" v=".*"/>
<tag k="name:ru" v=".*"/>
<tag k="name" v=".*"/>
</find>
<output>
<copy-matched/>
</output>
</translation>
<translation>
<name>name:en -> name</name>
<description>Kavala - Copy English name.</description>
<match>
<tag k="name:en" v=".*" match_id="myname"/>
</match>
<output>
<copy-all/>
<tag k="name" from_match="myname" v="{0}"/>
</output>
</translation>
<translation>
<name>name:el -> name</name>
<description>Kavala - Copy Greek name if no name exists.</description>
<match>
<tag k="name:el" v=".*" match_id="myname"/>
<notag k="name" v=".*"/>
</match>
<output>
<copy-all/>
<tag k="name" from_match="myname" v="{0}"/>
</output>
</translation>
<translation>
<name>int_name -> name</name>
<description>Kavala - Copy international name if no name exists.</description>
<match>
<tag k="int_name" v=".*" match_id="myname"/>
<notag k="name" v=".*"/>
</match>
<output>
<copy-all/>
<tag k="name" from_match="myname" v="{0}"/>
</output>
</translation>
<translation>
<name>name:ru -> name</name>
<description>Kavala - Copy Russian name if no name exists.</description>
<match>
<tag k="name:ru" v=".*" match_id="myname"/>
<notag k="name" v=".*"/>
</match>
<output>
<copy-all/>
<tag k="name" from_match="myname" v="{0}"/>
</output>
</translation>
<translation>
<name>Finalize name</name>
<description>Kavala - Move saved name back if no other name exists.</description>
<match>
<tag k="^saved_name$" v=".*" match_id="myname"/>
<notag k="name" v=".*"/>
</match>
<output>
<copy-all/>
<tag k="name" from_match="myname" v="{0}"/>
</output>
</translation>
<translation>
<name>Cleanup</name>
<description>Kavala - Sanitize our work by removing temporary tags.</description>
<match>
<tag k="^saved_name$" v=".*"/>
</match>
<output>
<copy-unmatched/>
</output>
</translation>
</translations>
_______________________________________________
osmosis-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/osmosis-dev