Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix order in public transport analysis #1274

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions analysers/analyser_osmosis_relation_public_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@
stop_platform.member_type || stop_platform.mid AS stop_id,
stop_platform.geom AS stop,
ROW_NUMBER () OVER (PARTITION BY route_linestring.id ORDER BY stop_platform.morder) AS stop_order,
ROW_NUMBER () OVER (PARTITION BY route_linestring.id ORDER BY ST_LineLocatePoint(route_linestring.geom, stop_platform.geom)) AS projected_stop_order,
ROW_NUMBER () OVER (PARTITION BY route_linestring.id ORDER BY ST_LineLocatePoint(ST_OffsetCurve(route_linestring.geom, -10), stop_platform.geom) DESC) AS projected_stop_order,
CASE
WHEN LEAD(stop_platform.morder, 1) OVER (PARTITION BY route_linestring.id ORDER BY stop_platform.morder) IS NULL THEN 1
ELSE 0
Expand All @@ -523,7 +523,7 @@
WHERE
stop_platform.mrole IN ('platform', 'platform_exit_only', 'platform_entry_only') AND
stop_platform.member_type='N' AND
GeometryType(route_linestring.geom) = 'LINESTRING' AND
GeometryType(ST_OffsetCurve(route_linestring.geom, -10)) = 'LINESTRING' AND
ST_LineLocatePoint(route_linestring.geom, ST_ClosestPoint(route_linestring.geom, stop_platform.geom)) NOT IN (0, 1)
)
"""
Expand Down