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?
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
✔ Generate tasks
✔ Finish up
The .osm file had the new points and the output .geojson file had for every point an entry like:
Generating that otherwise is doable but using the script is much easier. I see the base64 content is the osmchange content.
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.