alan-turing-institute / solar-panel-detection

Solar Panel Detection (Turing Climate Action Call)
23 stars 7 forks source link

Add "rule 2.5" to merge-rules #62

Open danstowell opened 4 years ago

danstowell commented 4 years ago

Hi Ed - I'm submitting this PR to the Turing's copy of the code, to request a sense-check from you. (I've other changes which I'll send downstream to Open Climate Fix.)

I found some REPD-OSM pairs that were not matched, despite explicit tagging in OSM. I think the issue is that rule 2 reuses rule 1's nearest neighbour search which isn't restricted to matching REPDs.

This uses an alternate nearest-neighbour search: rule 2 sticks with the nearest-REPD-item only, whereas rule 2.5 finds the nearest REPD item that also matches the tagged REPD id in OSM. In my test this increases the number of UK matches by 73, and fixes some un-matchings.