OpenStreetMap logo OpenStreetMap

Django <3 Overpass API

Posted by mvexel on 13 December 2015 in English. Last updated on 14 March 2016.

Update After talking to a lot of people about the future of MapRoulette and getting a lot of great feedback, I decided to abandon the Django effort I wrote about here. The New MapRoulette is coming together nicely! See its progress on Github.

I recently started looking into Django, the seminal Python web application framework. I like what I see much more that I thought I would, so much so that I am starting to rewrite MapRoulette as a Django application.

One thing I want to accomplish with a next version of MapRoulette is to make creating challenges much, much easier. For example, you should be able to define a challenge using an Overpass query. (You would be surprised how many annoying errors in OSM can be exposed with a pretty simple Overpass query! For example, here is a query that gives you all highway=tertiary that have no name in my home state Utah - 425 ways.)

So I needed a way for a Django application to access the Overpass API and display and store the results. That should be simple enough to accomplish using the Overpass API Python wrapper project I started a while ago. And it was!

screen

If you are interested in checking it out or trying it for yourself, just clone the Overpass API Python wrapper project. Look for the Django example app in the examples folder. (At the time of writing, the example lives on the branch example that is not merged into master yet.)

Many thanks to all the contributors to the Overpass API Python wrapper project! Let me know if you want to contribute as well, be it code, testing, or documentation. Thanks!

Discussion

Comment from RobJN on 14 December 2015 at 00:43

I won’t pretend that I understood you (I’m not a developer) but it sounds like you are getting on well. There is one question that does puzzle me though. As far as I am aware MapRoulette gives you random problems that could be no where near where you live. That is it encourages remote mapping. This works well in some instances but not others. The example you give of missing road names would usually require an on the ground survey.

Is (or could) map roulette be forked to create an “on the ground” assistant tool? For example we load in a series of challenges such as the missing road names one. I then load up my local area before going out surveying (or better still I view it on a smartphone whilst out surveying) and it shows me all challenges with issues within so many meters.

Now that would be amazing and I would definitely use it and learn how to create challenges - especially if you make it super easy :-)

Comment from mvexel on 14 December 2015 at 18:26

Rob - that is a very valid question. You are correct, MapRoulette encourages remote / armchair mapping, which is why we need to be very careful about what good and appropriate MapRoulette challenges are. I believe very strongly in MapRoulette as a tool to encourage remote participation. In fact, it was when I first moved to the U.S. and saw the vast amount of work that needed to be done to clean up and update imported TIGER data, that I first got the idea for MapRoulette.

In this particular example, we can rely on the TIGER (US Census basemap) overlay to retrieve the names:

tiger

But you are right, wherever we cannot fall back on reference data like TIGER in the US, a ‘missing names’ challenge would be a really bad MapRoulette challenge. So thanks for pointing that out.

Making MapRoulette into a field tool that can be used on mobile devices is high on my wish list. I would be very excited to get some help in that area :)

Comment from RobJN on 14 December 2015 at 19:13

Making MapRoulette into a field tool that can be used on mobile devices is high on my wish list. I would be very excited to get some help in that area :)

Happy to help with user testing and any mock up drawings you need but I’m afraid I can’t help with the coding. Can share this on twitter to see if it leads to support from elsewhere.

Log in to leave a comment