gregrs-uk / python-fhrs-osm

Python tools and Leaflet maps for downloading, comparing and visualising Food Hygiene Rating Scheme (FHRS) and OpenStreetMap data
http://gregrs.dev.openstreetmap.org/fhrs/
GNU General Public License v3.0
8 stars 2 forks source link

Don't use fhrs:id already in OSM for suggested matches #31

Closed spindr closed 7 years ago

spindr commented 7 years ago

If an fhrs:id is already present in OSM data don't use it to suggest matches to other OSM objects.

Pre-filter the id's from FHRS to only suggest matches for id's not present in OSM data.

gregrs-uk commented 7 years ago

Thanks for this @spindr. Could you give an example?

spindr commented 7 years ago

Ok, a bit difficult to explain -- but here goes:

On Bristol district: http://gregrs.dev.openstreetmap.org/fhrs/district-284.html

Look at the leftmost suggested yellow match -- this should be "Our lady of the Rosary".

If you try to add tags in JOSM then it tries to add fhrs:id=311265 to https://www.openstreetmap.org/way/279905273#map=19/51.49817/-2.66263

But https://www.openstreetmap.org/way/404867388#map=18/51.49868/-2.66162 already has fhrs:id=311265

Hope that's clear(ish).

gregrs-uk commented 7 years ago

That makes perfect sense - thanks for spotting this.

gregrs-uk commented 7 years ago

Should be fixed. Will check it's working correctly after the update tomorrow morning

gregrs-uk commented 7 years ago

Update failed. Problem fixed and I'm just running it manually.

gregrs-uk commented 7 years ago

Looks fixed

spindr commented 7 years ago

Brilliant. Thanks for adding the enhancement.