osm-nz / linz-address-import

Source code for the 2021 LINZ address import & maintenance, and the topographic/hydrographic data import
https://osm-nz.github.io/#/address-import
Other
4 stars 0 forks source link

System doesn't handle addresses that were moved by LINZ #21

Open k-yle opened 1 year ago

k-yle commented 1 year ago

We hardly ever suggest moving an address unless it's over a kilometre away from where it should be. However, sometimes every address on a street is shifted down by a few metres.

So, we should consider moving addresses if:

  1. LINZ has moved the address in their database; and
  2. the current location in OSM is still ±5 metres from the gazetted location; and
  3. the location in OSM has never been refined by another mapper since it was originally imported

This will be tricky because we need to process every week of the LINZ changelog for the past 6 years, to determine criteria (1) above.

Another issue is that the planet file doesn't have enough metadata to determine criteria (3) above. This means we need to fetch the history of every candidate address from the OSM API. There are over 2 million addresses, of which at least 100,000 have been moved at some point since 2017.

Edit: Feb. 2024: We now have a fork of the pbf2json module, which gives us access to the version number, changeset number, and the last user to edit the node. This is not quite enough info, but allows us to handle the common cases where an address has never been touched since it was imported.