I have some external data which I've converted into .osm format, resulting in the following: <tag k="Mode" v="highway" /> <tag k="Type" v="primary" /> which I'd like to turn into: <tag k="highway" v="primary" /> (Before anyone asks, this is not for data that will result in any kind of importing into OSM! Am merely using the OSM toolchain, but with data coming from a shapefile.) I can't work out from the Osmosis Tag transform documentation how to do this, if it is even possible. I suppose I am thinking something along these lines, but this doesn't work: <translation> <name>Convert from Shapefile headings to OSM key-value pairs</name> <description>-</description> <match type="way"> <tag k="Mode" v="(.+)" match_id="kv" /> <tag k="Type" v="(.+)" match_id="kv" /> </match> <output> <copy-unmatched /> <tag from_match="kv" k="{1}" v="{2}" /> </output> </translation> asked 20 Jul '16, 16:25 fooquency |
I've no idea what you want to do with it after osmosis, but if the answer was "load it into a rendering database" note that osm2pgsql can do what you want via a lua script:
https://github.com/openstreetmap/osm2pgsql/blob/master/docs/lua.md