DEV Community

PU JIE
PU JIE

Posted on

I built a location-to-station finder for China’s high-speed rail

China’s high-speed rail network is easy to admire and surprisingly easy to use once you know the correct station. The difficult part for many first-time visitors happens earlier: a single city can have several major stations, and a traveler often starts with a hotel, airport, attraction, or street address—not a station name.

I initially wanted to build a practical transport tool for foreign visitors in China. After reading travel questions, the recurring problem was not simply “how do I buy a train ticket?” It was:

  • Which station should I depart from?
  • Is Shanghai Hongqiao the same place as Shanghai Station?
  • Which English station name matches the Chinese name shown in the booking app?
  • Is the nearest station actually useful for my destination?

So I built a small station-finding workflow instead of another static railway map.

The workflow

The user enters two real places:

  1. where they are starting from, such as a hotel or airport;
  2. where they are going, such as another hotel, city center, or attraction.

The page then shows candidate departure and arrival stations side by side, with both English and Chinese station names. After the user selects a pair, the tool prepares the exact station names for an official Railway 12306 check.

You can try the current version here:

China high-speed rail station finder

Why I did not turn it into a ticket seller

Railway schedules, ticket availability, fares, and passenger rules are official-service data. I do not want a travel helper to imply that a route exists merely because two stations are geographically close.

The boundary is therefore deliberate:

  • Ask-China helps turn real places into candidate stations.
  • It shows bilingual names so travelers can recognize the correct station.
  • Railway 12306 remains the final place to verify the journey and book.

This also keeps failure states honest. If place search or route estimation is unavailable, the page should say that instead of inventing a confident answer.

The implementation decisions that mattered

1. Treat a city and a station as different entities

A city name is not enough. “Shanghai” may refer to Shanghai Station, Shanghai Hongqiao, Shanghai South, or another station. The UI keeps the traveler’s place, the candidate station, and the official railway identity separate.

2. Use a controlled station directory

Place-search providers may return landmarks, metro stops, or similarly named POIs. Candidate stations are matched against a controlled Railway 12306 station directory before they are shown as official rail stations.

3. Preserve bilingual names

The English name helps the traveler understand the result. The Chinese name helps them match signs, taxis, maps, and Chinese booking screens. Showing only one language creates avoidable mistakes.

4. Make the final handoff explicit

The result is guidance, not a live timetable. The last step is an official 12306 verification, with the selected station names kept visible so the traveler can notice a mismatch.

What I am testing next

I am looking for cases where the “nearest” station is not the best practical station, especially in cities with several large hubs. I also want to learn whether visitors understand the difference between station selection and live train availability without reading a long explanation.

If you have traveled by train in China, I would appreciate examples where a city’s station names confused you—or where a geographically close station was the wrong choice.

Disclosure: I used AI to help edit this post. The product problem, implementation decisions, and boundaries described here are mine.

Top comments (0)