Show HN: Follow London Trains in 3D

ride.nexttrain.london

137 points by mgranados 4 days ago

deck.gl based visualiser of the TFL Api + National Rails to be able to track (with minimal drift) a train along the way in London and to the nearest airports. If you pick one from any platform in https://nexttrain.london basically you can share your train journey along the rails. Build to test Cloudflare workers and their infra along with deck.gl performance that is incredible in my opinion.

Rophlock 11 hours ago

Congratulations, it seems very cool.

It's not the same, but I've tried to create a free browser-based app to track bus lines where I live (Brazil), but I had to pause this project, as each city uses a different way to track their public transportation, and it would be hard to gather all the info in a way to be usable in the whole country.

It's nice to see something similar implemented to track the transportation in another country.

  • mgranados 10 hours ago

    thank you so much! yeah the data comes in many different ways! just here tfl is diff from national rails i've found llms super helpful tho

IIAOPSW 13 hours ago

This is frustratingly close to amazing. Obviously you went through all the trouble of pulling all the data from all the trains and displaying them in 3d, but then lock our view on to just one train or one station while all that interesting information zips around in the periphery. The view port needs to be more free form...less on rails.

  • mgranados 12 hours ago

    I'll have a note on this! Thanks a lot! a free form to browse the trains I think is definitely doable whilst keeping it performant

modeless 11 hours ago

The rendering is a bit weird. It's disorienting to have the trains simultaneously underneath the map and occluding it. It also seems like the z-buffer is not being used correctly when rendering the train cars.

  • mgranados 10 hours ago

    yeah the trains are meant to feel "underground" maybe the effect needs improving

    • gilfaethwy 8 hours ago

      I wonder how much work it would be to actually handle them being underground/overground at appropriate places? e.g. the District Line and/or Picadilly near Hammersmith. Would be cool!

darknavi 16 hours ago

I'd love to see a view with all/many trains. In London I was constantly wondering what the criss-cross of underground lines looked like.

  • mgranados 15 hours ago

    I saw a project like that here in hn recently for all uk trains even. it'd be pretty cool to extend this to support that, busy stations might be visually confusing, thanks for suggestions

flockonus 10 hours ago

Looking at this gave me a renewed (even if brief) sense of appreciation for our society.

Even with all of its problems, for this moment in time our society is operating effectively enough that humans can engineer interesting, beautiful, culturally rich landscapes (cities) in quite a significant size scale.

Cheers to us, in 2026.

  • hdgvhicv 9 hours ago

    Vast majority of those miles were built over 100 year ago.

Liquidor 12 hours ago

This is scary. I literally just had a dream last night wishing I could see the metro trains from above the ground in order to follow where the tunnels are under the buildings and all that. Wow.

  • mgranados 12 hours ago

    Accuracy may vary, but it's great to see dreams come true!

Pigo 13 hours ago

This is a fun idea and interesting implementation. I know there's only so much an api can give you, but I'd love to see anything that gives more information or visuals of the surroundings.

  • mgranados 12 hours ago

    thanks! you mean more 3d buildings? I'd love to explore that or more labels on things along the way?

    • Pigo 11 hours ago

      I'd assume there's better options, but I've worked a lot with cesium. Even it has some interesting visualizations, textures, even weather you can add with it. Anything that could make it feel more immersive would just be cool in my opinion. That just sounds like fun to me.

eMPee584 12 hours ago

Like on most other digital maps today, what's direly missing is a scale bar.. cool feat though, thanks for showing!

  • mgranados 10 hours ago

    yeah scales have definitely been modified for theatrical (many landmarks) thank you!

Eduard 12 hours ago

using Google Pixel 7a with Chrome Android.

while the 3d buildings render properly, the trains' polygons have a flipped z-order: polygons that are supposed to be layered behind are actually in front.

nevertheless, great website!

  • mgranados 12 hours ago

    tysm for the report ill have a look, tried some things to optimise for mobile, I'll check it more

ninjahawk1 12 hours ago

I guess I’m a train guy now

  • giancarlostoro 12 hours ago

    Coworker used to have a specific stream up everyday, apparently he'd seen a car get pummeled by the train. Every now and then something interesting would be on the train. I saw military tanks and gizmos on one stream, was kind of neat.

  • mgranados 12 hours ago

    There's planes by the airports too

TheOtherHobbes 16 hours ago

Interesting but quite buggy. Example: mouse dragging seems trapped in a fairly small area.

  • mgranados 15 hours ago

    Ah yeah i tried anchoring to the train with a threshold for panning around i'll try smoothing it. thanks for trying it!

fredley 17 hours ago

Very nice, but the map seems to be in the wrong position vs. the trains/3d elements.

dmazin 16 hours ago

It would appear you are missing the High Barnet branch of the Northern line.

  • uukelele 15 hours ago

    And the Reading branch of the Elizabeth line

    • mgranados 15 hours ago

      thanks for feedback i'll have a look!

  • jdswain 12 hours ago

    Looks like many (all?) branches are missing. Central line doesn't have the Ealing Broadway branch.

kentonv 3 days ago

This is really cool!

Quick suggestion: When not tracking a train, the mouse wheel should zoom into / out from where the cursor is pointing, rather than the center of the window.

  • mgranados 15 hours ago

    thanks! that's a great suggestion will implement

sdoering 16 hours ago

Having just taken the Elisabeth Line to LHR T5 and sitting here, this was fun. Thanks.

Edit: Is there a Repo to look at and learn from this?

  • mgranados 15 hours ago

    <3 thanks!! i'll clean it and share here sometime soon

hokkos 15 hours ago

There seems to be some parallax issues between your trip layer and your 3D Tiles layer, but nice usage of deck.gl.

  • mgranados 15 hours ago

    thank you! i'll have a look

  • taylorius 15 hours ago

    Is it not that certain train lines are somewhat deep underground? The Piccadilly line swims with respect to the ground in the centre of town, when it is below ground. Further out where lines are at the surface the routes stick to the ground correctly.

ohjeez 16 hours ago

This is incredibly cool. I had it open on my desktop for most of the day.

purplecats 11 hours ago

the tracks arent grounded to the map, they slide all over, and would it cool if we could use satellite view

Falimonda 16 hours ago

How do I drive the train? Arrow keys not working :(

  • mgranados 15 hours ago

    It's just following api data for now. That'd be a real cool feature for backlog!

jrrv 16 hours ago

The planes were a surprise

adecoster 14 hours ago

A bit buggy in term of tiles jonctions

Leewen 15 hours ago

model rough but amazing. i cant do this

tamimio 12 hours ago

Neat! I chose victoria one and it was flying over the buildings!

  • mgranados 12 hours ago

    I knew Victoria was fast but not so much! On a serious note it's meant to have a sense of being underground that maybe it's failing to convey. I'll check the line in more detail thanks.

gowld 16 hours ago

The train paths are drawn on a 2D layer above the buildings, not at z-index that matches the proper 3-D position. So the paths appear to weave around and over the tops of buildings.

  • mgranados 15 hours ago

    I meant to make it feel like the tube ones felt "underground" by some metres i'll have a look thanks