OsmAnd customization: challenge 2 - Facebook imports in Thailand

The imports by Facebook in Thailand are subject of several threads in the Thai sub-forum. There is some consensus that it’s best to treat their unclassified, residential, service as “highway=road” (while their highway=track may be treated like “normal” tracks). Their imports can be identified by an “import=yes” tag.

In my rendering_types.xml, I added near the top of the file:

<entity_convert pattern="tag_transform" from_tag="import" from_value="yes" if_tag1="highway" if_not_value1="track" to_tag1="highway" to_value1="road" to_tag2="facebook_import" to_value2="yes" routing="yes"/>
<entity_convert pattern="tag_transform" from_tag="import" from_value="yes" if_tag1="highway" if_value1="track" to_tag1="highway" to_value1="track" to_tag2="facebook_import" to_value2="yes" routing="yes"/>

which seems to do the trick quite well.

There is only a minor glitch: I’d still like to be able to add some overlay for roads which were imported by Facebook. Their “import=yes” tag vanishes when the .obf file gets created. It does so even when my additional rules are not present. Hence I tried to convert that tag to “facebook_import=yes”, but also that tag does not show up.

What can be done here?