osmlab/maproulette — pull request #253 by mvexel (2014-05-09 19:36:25+00:00)
Title: user selection of preferred editing area + required backend changes 

This pull request focuses on adding preferred local area support for MapRoulette. It works like this. A new button appears at the top of the challenge selection dialog:

![screenshot 2014-05-05 13 49 25](https://cloud.githubusercontent.com/assets/120452/2932404/3e9a9fd8-d7b0-11e3-8d02-51b50aa0baba.png)

After clicking this, the user can click on the map to select the center of their editing area. A notification pops up to guide them:

![screenshot 2014-05-05 14 05 05](https://cloud.githubusercontent.com/assets/120452/2932409/65d5a67e-d7b0-11e3-96d5-78659c4707bd.png)

After this, the challenge selection will be filtered for this area.

Also, statistics in the sidebar are back.

The changes are mostly client side, but a notable change in the back end is the addition of a location field in the Task model. This field holds a location hint for each task (a point), based on the geometries. This field will be populated automatically for new tasks as geometries are loaded / changed, but the field needs to be populated for existing tasks when upgrading an existing deployment. There is a new function in the manager script for this, so this is as simple as

python manage.py populate_task_loacation

This can take a little time, I tested it on a dev instance with about 100K tasks on it and that took something like 45 minutes.