Skip to content

Commit

Permalink
Fix #2091
Browse files Browse the repository at this point in the history
- Prevent 'duplicate error' in diff mode by including b1.id
- Disable check for point overlaps as this cannot be due to a "split by land plot"
  • Loading branch information
Famlam committed Dec 26, 2023
1 parent ab61299 commit 4c88b29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion analysers/analyser_osmosis_building_overlaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
SELECT
DISTINCT ON (b2.id)
b2.id,
b1.id,
ST_AsText(way_locate(b2.linestring))
FROM
{0}buildings AS b1
Expand All @@ -145,6 +146,7 @@
b1.tags->'building' = b2.tags->'building' AND
b1.wall = b2.wall AND
ST_Intersects(b1.polygon_proj, b2.polygon_proj) AND
ST_Dimension(ST_Intersection(b1.polygon_proj, b2.polygon_proj)) > 0 AND
b2.npoints = 4
WHERE
NOT b1.relation AND
Expand All @@ -153,6 +155,8 @@
NOT b2.layer AND
b1.polygon_proj IS NOT NULL AND
b2.polygon_proj IS NOT NULL
ORDER BY
b2.id
"""

class Analyser_Osmosis_Building_Overlaps(Analyser_Osmosis):
Expand Down Expand Up @@ -200,7 +204,7 @@ def __init__(self, config, logger = None):
self.callback50 = lambda res: {"class":4, "data":[self.way, self.way, self.positionAsText]}
self.callback60 = lambda res: {"class":5, "subclass": stablehash64(res[0]), "data":[self.positionAsText]}
if self.FR:
self.callback70 = lambda res: {"class":6, "data":[self.way, self.positionAsText]}
self.callback70 = lambda res: {"class":6, "data":[self.way, self.way, self.positionAsText]}

def analyser_osmosis_full(self):
self.run(sql20)
Expand Down

0 comments on commit 4c88b29

Please sign in to comment.