I am working on a workspace that reads Tourism Information Office data from an XML file, converts the attributes to OSM tags and writes it to an OSM file. This OSM file is then processed by a program called OsmAndMapCreator to create an obf (OsmAnd Binary Format) file for the OsmAnd mobile application.
Â
Each office has a collection of characteristics and services so there is more than 1 tag for each node. The order in which those tags are written to the OSM file is important for how the feature will appear on the map. A tourism information office that has parking or picnic tables still needs to appear as a tourism information office no matter what else they offer.Â
The OSM writer does not maintain the order of its reader or User Attributes list. In my reader and writer the tourism tag is at the top but for some reason, it is always the last one in my OSM file.
Â
Â
Here's 2 nodes where it creates a problem.
This node shows up as a picnic table on my map but it should appear has a tourism information office.
<node lat="46.7175626" lon="-74.603273" id="-142">
Â
<tag k="leisure" v="picnic_table"/>Â
<tag k="amenity" v="charging_station;parking;sanitary_dump_station;telephone"/>Â
<tag k="shop" v="yes"/>Â
<tag k="facebook" v="http://www.facebook.com/TourismeMontTremblant/"/>Â
<tag k="internet_access" v="wlan"/>Â
<tag k="telephone" v="1 877 425-2434"/>Â
<tag k="email" v="info@mont-tremblant.ca"/>Â
<tag k="wheelchair" v="yes"/>Â
<tag k="tourism" v="information"/>Â
</node>Â
This one shows as a parking lot.
<node lat="46.03219" lon="-74.204372" id="-35">
Â
<tag k="leisure" v="children_playground;picnic_table"/>Â
<tag k="amenity" v="parking"/>Â
<tag k="shop" v="yes"/>Â
<tag k="internet_access" v="wlan"/>Â
<tag k="telephone" v="1 888 322-7030 (4235)"/>Â
<tag k="email" v="tourisme@valdavid.com"/>Â
<tag k="wheelchair" v="yes"/>Â
<tag k="website" v="http://www.valdavid.com"/>Â
<tag k="name" v="Bureau d'accueil touristique de Val-David"/>Â
<tag k="tourism" v="information"/>Â
</node>Â
Â
Â
In both cases, manually editing the osm file to move <tag k="tourism" v="information"/> at the top fixed my problem and made those 2 points appear as tourism information office on my map.
Â
So how do I fix that ? How do I force FME to keep my tags in the same order as the user attributes ?