- For each trip: (find one trip per shape and just process that. should end up with 2 (one per direction) per service pattern, in theory) - get the geojson line, really just need the coordinates TBH - for each segment (between stations): - slice line between points, note length, and note time - also note station order for trip and deduplicate arrays of trips - while we could check for duplication here, its best to use overwriting for simplicity's sake - besides, any time saved by service pattern deduplication would probably be far outweighed by the cost of comparing trip stop times. - build shapes - build stop time segments between stations - split up shapes based on closest point to various stations - store elements - when having to find location when one isn't given: - find last station and next station (based on next two stations) BIG FUCKING THING TO NOTE: - because the cta HATE ME theyve decided each yellow line round trip is A SINGLE TRIP so it kinda breaks my algo. - always check for [route id]_[next station]_[next station] on top of normal [route id]_[next station]_undefined to account for this little bit of funny business