From cb92d3fb7965d88d7e0a4b5207eb873fd34cf37a Mon Sep 17 00:00:00 2001 From: didier2020 Date: Thu, 12 Sep 2024 12:33:18 +0200 Subject: [PATCH] Update analyser_osmosis_duplicated_geotag.py (#2327) --- .../analyser_osmosis_duplicated_geotag.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/analysers/analyser_osmosis_duplicated_geotag.py b/analysers/analyser_osmosis_duplicated_geotag.py index 46e08efde..9411661fc 100644 --- a/analysers/analyser_osmosis_duplicated_geotag.py +++ b/analysers/analyser_osmosis_duplicated_geotag.py @@ -30,22 +30,22 @@ ways.id, tags - ARRAY['source', 'created_by'] AS tags, CASE - WHEN ST_X(ST_StartPoint(linestring)) = ST_X(ST_StartPoint(linestring)) THEN + WHEN ST_X(ST_StartPoint(linestring)) = ST_X(ST_EndPoint(linestring)) THEN CASE - WHEN ST_Y(ST_StartPoint(linestring)) < ST_Y(ST_StartPoint(linestring)) THEN linestring + WHEN ST_Y(ST_StartPoint(linestring)) < ST_Y(ST_EndPoint(linestring)) THEN linestring ELSE ST_Reverse(linestring) END - WHEN ST_X(ST_StartPoint(linestring)) < ST_X(ST_StartPoint(linestring)) THEN linestring + WHEN ST_X(ST_StartPoint(linestring)) < ST_X(ST_EndPoint(linestring)) THEN linestring ELSE ST_Reverse(linestring) END as linestring, sha224(ST_AsBinary( CASE - WHEN ST_X(ST_StartPoint(linestring)) = ST_X(ST_StartPoint(linestring)) THEN + WHEN ST_X(ST_StartPoint(linestring)) = ST_X(ST_EndPoint(linestring)) THEN CASE - WHEN ST_Y(ST_StartPoint(linestring)) < ST_Y(ST_StartPoint(linestring)) THEN linestring + WHEN ST_Y(ST_StartPoint(linestring)) < ST_Y(ST_EndPoint(linestring)) THEN linestring ELSE ST_Reverse(linestring) END - WHEN ST_X(ST_StartPoint(linestring)) < ST_X(ST_StartPoint(linestring)) THEN linestring + WHEN ST_X(ST_StartPoint(linestring)) < ST_X(ST_EndPoint(linestring)) THEN linestring ELSE ST_Reverse(linestring) END )) as linestring_hash @@ -104,22 +104,22 @@ ways.id, tags - ARRAY['source', 'created_by'] AS tags, CASE - WHEN ST_X(ST_StartPoint(linestring)) = ST_X(ST_StartPoint(linestring)) THEN + WHEN ST_X(ST_StartPoint(linestring)) = ST_X(ST_EndPoint(linestring)) THEN CASE - WHEN ST_Y(ST_StartPoint(linestring)) < ST_Y(ST_StartPoint(linestring)) THEN linestring + WHEN ST_Y(ST_StartPoint(linestring)) < ST_Y(ST_EndPoint(linestring)) THEN linestring ELSE ST_Reverse(linestring) END - WHEN ST_X(ST_StartPoint(linestring)) < ST_X(ST_StartPoint(linestring)) THEN linestring + WHEN ST_X(ST_StartPoint(linestring)) < ST_X(ST_EndPoint(linestring)) THEN linestring ELSE ST_Reverse(linestring) END as linestring, sha224(ST_AsBinary( CASE - WHEN ST_X(ST_StartPoint(linestring)) = ST_X(ST_StartPoint(linestring)) THEN + WHEN ST_X(ST_StartPoint(linestring)) = ST_X(ST_EndPoint(linestring)) THEN CASE - WHEN ST_Y(ST_StartPoint(linestring)) < ST_Y(ST_StartPoint(linestring)) THEN linestring + WHEN ST_Y(ST_StartPoint(linestring)) < ST_Y(ST_EndPoint(linestring)) THEN linestring ELSE ST_Reverse(linestring) END - WHEN ST_X(ST_StartPoint(linestring)) < ST_X(ST_StartPoint(linestring)) THEN linestring + WHEN ST_X(ST_StartPoint(linestring)) < ST_X(ST_EndPoint(linestring)) THEN linestring ELSE ST_Reverse(linestring) END )) as linestring_hash