Skip to content

Commit

Permalink
Update analyser_osmosis_duplicated_geotag.py (#2327)
Browse files Browse the repository at this point in the history
  • Loading branch information
didier2020 authored Sep 12, 2024
1 parent ecc157d commit cb92d3f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions analysers/analyser_osmosis_duplicated_geotag.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cb92d3f

Please sign in to comment.