Skip to content

Many stations have 2-3 points or more on map. Fix this #153

@mbjackson-capp

Description

@mbjackson-capp

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:
Screen Shot 2024-05-21 at 11 14 41 AM

But when you zoom out the clusters, it says there are 3:
Screen Shot 2024-05-21 at 11 14 57 AM

And clicking the cluster shows all three:
Screen Shot 2024-05-21 at 11 15 32 AM

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.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions