fix poscode update computation: use distance

This commit is contained in:
Sarah Hoffmann
2025-08-29 15:10:27 +02:00
parent 5968f7d646
commit c2a311e69c
2 changed files with 7 additions and 5 deletions

View File

@@ -119,7 +119,7 @@ class _PostcodeCollector:
pcobj = self.collected.pop(postcode, None)
if pcobj:
newx, newy = pcobj.centroid()
if (x - newx) > 0.0000001 or (y - newy) > 0.0000001:
if abs(x - newx) > 0.0000001 or abs(y - newy) > 0.0000001:
to_update.append((newx, newy, postcode))
else:
to_delete.append(postcode)