mysociety / global.mapit.mysociety.org

Installation of MapIt using global OpenStreetMap data
http://global.mapit.mysociety.org/
Other
1 stars 1 forks source link

mapit_global_import: add a --alter-current-generation option #2

Closed mhl closed 7 years ago

mhl commented 7 years ago

Sometimes you just want to fix some boundaries without doing a whole new import. This new option, rather than insisting on a new inactive generation to import into, will update or add areas in the current (i.e. latest active) generation.

mhl commented 7 years ago

Oh, good point. I'll deal with that tomorrow.

mhl commented 7 years ago

I hope that change is right. (I'm not 100% of the logic around there, for example since it looks like https://github.com/mysociety/global.mapit.mysociety.org/blob/d89202c27cbd702f4fefcfd4c58810262ec07528/mapit_global/management/commands/mapit_global_import.py#L243 should have a continue right afterwards.)

dracos commented 7 years ago

I believe that 'skipping' means "skip the next bit of code comparing the boundary with previous", not "skip doing anything with this area". If the previous was empty, it would create a new boundary, which seems right if you didn't want to pretend you had that area in the previous generation. So this looks :+1: