How to transfer tags to MapRoulette?

Is there any way to automatically transfer the tags in a MapRoulette challenge to iD or JOSM?

The tags are already uploaded to MapRoulette in a geojson file, but users currently have to copy tags manually into the editor for each challenge.

When using MapRoulette for importing for example POIs it would be very helpful to transfer the predefined tags into the editors.

I guess you’re searching for Cooperative Challenges, right?.
See this documentation for getting started: Cooperative Challenges | MapRoulette Docs

Could be, but only “Modify element” is documented (used on a pre-existing OSM element with an id).

I need to create a new node and add tags from a geosjon file. Is that supported, and how do I need to structure the geojson file to define each Cooperate challenge?

Is this what you are searching for?

1 Like

Thank you for the suggestion. I think it is rather Example 1 earlier on the same page: @maproulette/mr-cli - npm

However, I do not have the environment to run the mr-cli script, so I am just looking for how to structure the resulting geojson file for the particular case of new nodes without any links to existing OSM id’s. There are examples in this repository of geojson files with id’s but not without, and the MapRoulette documentation only deals with existing id’s.

I think you better invest time/resources to get an environment to run the mr-cli script.

I did once generate a challenge to create new new OSM objects using:

$ mr cooperative change --out my_challenge.geojson my_challenge.osm
✔ Initialize
✔ Generate tasks
✔ Finish up

The .osm file had the new points and the output .geojson file had for every point an entry like:

{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"amenity":"cafe","brand":"Rustpunt.nu","brand:website":"https://www.rustpunt.nu/","name":"Rustpunt \"t Koetshuis","note":"Ook: Dieren aanwezig, Veehouderij, Akkerbouw","outdoor_seating":"only","ref:rustpunt":"3801","self_service":"yes","source":"https://www.rustpunt.nu/poi/?p_id=3801","source:date":"2023-05-23","website":"http://www.stalhouderij.n","@id":"node/-141355"},"geometry":{"type":"Point","coordinates":[5.30988,52.17938]}}],"cooperativeWork":{"meta":{"version":2,"type":2},"file":{"type":"xml","format":"osc","encoding":"base64","content":"PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4KPG9zbUNoYW5nZSB2ZXJzaW9uPScwLjYnPgogIDxjcmVhdGU+CiAgPG5vZGUgaWQ9Ii0xNDEzNTUiIGxhdD0iNTIuMTc5MzgiIGxvbj0iNS4zMDk4OCI+CiAgICA8dGFnIGs9ImFtZW5pdHkiIHY9ImNhZmUiLz4KICAgIDx0YWcgaz0iYnJhbmQiIHY9IlJ1c3RwdW50Lm51Ii8+CiAgICA8dGFnIGs9ImJyYW5kOndlYnNpdGUiIHY9Imh0dHBzOi8vd3d3LnJ1c3RwdW50Lm51LyIvPgogICAgPHRhZyBrPSJuYW1lIiB2PSJSdXN0cHVudCAmcXVvdDt0IEtvZXRzaHVpcyIvPgogICAgPHRhZyBrPSJub3RlIiB2PSJPb2s6IERpZXJlbiBhYW53ZXppZywgVmVlaG91ZGVyaWosIEFra2VyYm91dyIvPgogICAgPHRhZyBrPSJvdXRkb29yX3NlYXRpbmciIHY9Im9ubHkiLz4KICAgIDx0YWcgaz0icmVmOnJ1c3RwdW50IiB2PSIzODAxIi8+CiAgICA8dGFnIGs9InNlbGZfc2VydmljZSIgdj0ieWVzIi8+CiAgICA8dGFnIGs9InNvdXJjZSIgdj0iaHR0cHM6Ly93d3cucnVzdHB1bnQubnUvcG9pLz9wX2lkPTM4MDEiLz4KICAgIDx0YWcgaz0ic291cmNlOmRhdGUiIHY9IjIwMjMtMDUtMjMiLz4KICAgIDx0YWcgaz0id2Vic2l0ZSIgdj0iaHR0cDovL3d3dy5zdGFsaG91ZGVyaWoubiIvPgogIDwvbm9kZT4KICA8L2NyZWF0ZT4KPC9vc21DaGFuZ2U+"}}}

Generating that otherwise is doable but using the script is much easier. I see the base64 content is the osmchange content.

1 Like

Thank you, just what I needed. From this it seems the new id’s should be negative, and no need for a “modifyElement” operation. The structure seems easy to generate from an existing geojson file. Will give it a try.

Based on the example provided by @emvee here I created a simple python script to generate a challenge definition file from any geojson file containing new POIs (nodes only). There is an example output there.

However, my test challenge in MapRoulette is not copying the new nodes to JOSM, nor is it providing any other way of editing the POIs. I am probably missing something in the challenge definition, just not sure what it could be.

I did open your test challenge and see the POI’s ending up on what seems to be the correct position.

When I click one (the one at 14.407635, 67.2916597) however Josm does receive the request but generates an “unexpected exception”:

So very likely caused by illegal data in the challenge.

I discovered a mistake in my structure for the cooperativeWork json. After fixing it the challenge runs without error messages. Thank you @emvee for your help!

For some reason the new feature is not copied to JOSM for all tasks. Same behavior for the mr script and my own python script. Perhaps MapRoulette spends some time updating the challenge after a rebuild, or else there is probably an error in MapRoulette.