-
Notifications
You must be signed in to change notification settings - Fork 2
Description
For many subway, commuter rail, and streetcar lines, what looks like a single station point is actually 2-3 points on the same spot. This results in massive overcount of number of stations. It will also mess up things like ridership and station/route relation once tooltips are further built out.
See O'Hare Blue Line CTA stop -- at max zoom, it looks like one point:
But when you zoom out the clusters, it says there are 3:
And clicking the cluster shows all three:
I strongly suspect that at least two of these are GTFS treating inbound-direction and outbound-direction as separate stations. Not sure where the third one comes in.
(This shouldn't affect bus stations. Bus stations accurately appear as separate objects on different sides of the same street block.)
A very hacky way to do this might involve a SELECT DISTINCT
(but Django syntax version) on querying the database, so there are no exact-matches on location coordinates. It may make sense to set some fuzzy tolerance so stops of the same name and transit mode with coordinates within ~10 meters of each other are not allowed.
There's more backend questions about how to ensure all the important data for each stop is aggregated into the one point that remains.
It would also help as part of this to refactor the views.py
and map.js
code so that the actual stations geoJSON objects are passed into the map JavaScript (the way the routes are), so we can add more stuff to tooltips (like station_id
) and test which attributes are duplicated vs. not across the redundant points. I may make a separate issue for that.