osmlab/to-fix — pull request #47 by sbma44 (2014-11-11 23:39:41+00:00)
Title: task prioritization by geographic area

Run it against a freshly-loaded database created using the most recent changes to `csv-err` (https://github.com/osmlab/csv-err/commit/fc3186aef14900474312e42904909929eb3b5c54).

Example usage:

`node prioritize.js unconnected_major1 boundary1.geojson boundary2.geojson`

If you have a directory of geojson files, you can use them all like so (but turn the apostrophes into backticks, Markdown won't let me):

`node prioritize.js unconnected_minor5 'find /path/to/my/files -type f'`

- GeoJSON files should be FeatureCollections containing single polygons. [Here's a working example file](https://gist.github.com/sbma44/bb3aa6028cf5b712ecad).
- Matching all these points is slow, but should work fine with `parallel`. I'm not sure it can be substantially sped up without a more complex geometry engine.
- This script has been tested with OSMI tasks. Others should work but haven't yet been tried.
- Matched tasks will be placed at the start of the unfixed-task keyspace, while all other tasks will have their keys' `skipval` increased so as to put them at the back of the line.
- If you re-run the script, the latest prioritization will take precedence, though previous reorderings will also be preserved (they will just be pushed back in line). This should allow for multiple levels of prioritization and for emergency promotion of certain regions.
- By default, only one level of prioritization is computed. If you have overlapping geoJSON files, the `--slow` param will cause tasks in the overlapping area to be appropriately (super-)prioritized. This comes with a substantial performance penalty and is not yet well-tested.