At the moment, https://github.com/OpenAddressesUK/distiller/blob/master/lib/distil.rb#L74 is a bit of a mess.
We assume we're always going to have a geometry and match it EXACTLY, which was fine(ish) when we only had one source, but we need to look at this in more detail.
I don't see why we can't do something similar to https://github.com/OpenAddressesUK/distiller/blob/master/lib/distil.rb#L47, which if it finds multiple localities with the same name, finds the nearest locality to that addresses' postcode.
That said, we may have some issues when we start importing addresses without postcodes.
At the moment, https://github.com/OpenAddressesUK/distiller/blob/master/lib/distil.rb#L74 is a bit of a mess.
We assume we're always going to have a geometry and match it EXACTLY, which was fine(ish) when we only had one source, but we need to look at this in more detail.
I don't see why we can't do something similar to https://github.com/OpenAddressesUK/distiller/blob/master/lib/distil.rb#L47, which if it finds multiple localities with the same name, finds the nearest locality to that addresses' postcode.
That said, we may have some issues when we start importing addresses without postcodes.