OpenStreetMap

Creating MapRoulette Challenges from GeoJSON

Posted by mvexel on 8 December 2016 in English (English)

This post also appears on the MapRoulette wiki

Creating MapRoulette challenges has never been easier. You can use the API or the brand new Challenge Wizard. I will cover the API in a future post. I have already covered the Wizard in general in a previous post, but right now I want to focus on creating a Challenge with a GeoJSON file.

In my example case, I have a GeoJSON file containing all the bus stop locations in Utah. I downloaded these as a Shapefile from the Utah GIS portal and converted them to GeoJSON using QGIS (there are other methods too, like ogr2ogr but I am too old for that). The result looks like this:

{
    "type": "FeatureCollection",
    "crs": {
        "type": "name",
        "properties": {
            "name": "urn:ogc:def:crs:OGC:1.3:CRS84"
        }
    },
    "features": [
        {
            "type": "Feature",
            "properties": {
                "StopId": 13840.0,
                "StopName": "HILL FIELD RD @ 1891 N",
                "StreetNum": 1891.0,
                "OnStreet": "N HILL FIELD RD",
                "AtStreet": "ANTELOPE DR",
                "City": "LAYTON",
                "InService": 1,
                "Bench": 0,
                "Shelter": 0,
                "Lighting": 0,
                "Garbage": 0,
                "Bicycle": 0,
                "Transfer": 1,
                "LocationUs": "Bus Stop",
                "UTAStopID": "101001"
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -111.97361202442978,
                    41.08738199558664
                ]
            }
        },
...

With this GeoJSON, I go to MapRoulette. After logging in, I go to my Project and create a new Challenge. (For more details on this, see my original post on creating challenges.) I enter the basic information for the Challenge:

basic

Then I go to the next screen to choose my GeoJSON file:

geojsonchooser

I choose sensible numbers for the default zoom levels and base map:

basemap

And then I can complete my Challenge.

completebuilding

After a while I hit refresh in the browser and see that my Challenge is complete, with a little over 6000 tasks. This is the same as the Feature count in the original Shapefile, so I am happy. I can now go to a random task:

randomtaskstart

And see what the challenge looks like:

lookslike

Looks pretty good! I can also click on the marker to see the GeoJSON properties:

balloon

Now everyone can help add bus stops near me!

But wait...

A word on the quality of this Challenge. It is really hard to verify that a bus stop actually exists using just Bing imagery. So this Challenge may not be suitable for anyone who does not already know the area very well. Another good source for people who don't know the local area is OpenStreetCam or Mapillary imagery. Without knowing if there is coverage for these sources, the Challenge can be hit or miss.

OSC

Finally, MapRoulette does not (yet) add the location of the new node to JOSM or iD when you click 'Edit', so you end up switching back and forth between MapRoulette and editor to figure out where to add the bus stop.

In the future, we want to extend MapRoulette to support better handling of GeoJSON source data:

  • Automatic adding of the feature to JOSM or iD (if possible) when clicking 'Edit'
  • parsing of GeoJSON properties and adding them as tags for the new feature

So with a properly formatted GeoJSON you could take most of the hard work out of mapper's hands and they would just need to verify and upload. That would be great progress for community-driven human imports. Please help make this happen, contribute to MapRoulette!

Happy Mapping!

Login to leave a comment