Dutch Train Map Simulator: Railway Visualization Powered by Open Data

Exploring how open data and WebGL power real-time Dutch railway network visualization.
This article examines the Dutch Train Map Simulator, a visualization project that renders real-time train movements across the Netherlands' railway network. It covers the technical stack including GTFS data acquisition from Dutch open data platforms, timetable interpolation algorithms for smooth animation, coordinate projection handling, and WebGL-based rendering optimization for displaying hundreds of simultaneous trains in the browser.
When Code Meets Rails
Among the many technical projects out there, some stand out for their unique perspective and elegant implementation. The "Dutch Train Map Simulator" is exactly this kind of project. It's not a large-scale commercial application, but rather a visualization experiment brimming with geek spirit — presenting the real-time movement of trains across the entire Dutch railway network on a dynamic map.
Projects like this may seem simple on the surface, but they encompass technical challenges spanning data acquisition, geographic information processing, and real-time rendering. They represent a noteworthy direction in technical creativity: using visualization to make abstract public transit data tangible, allowing anyone to intuitively feel the operational rhythm of a railway system.
Technical Implementation of Railway Data Visualization
Data Sources and Acquisition Methods
The Dutch railway system is renowned for its density and punctuality. The Dutch national railway company (NS) and infrastructure management organization ProRail have long provided open data interfaces. The Netherlands boasts one of Europe's densest railway networks, with approximately 6,800 kilometers of track covering a land area of just 41,543 square kilometers, transporting an average of 1.2 million passengers daily. NS handles passenger services, while ProRail operates as an independent infrastructure manager responsible for network maintenance and dispatching. Since 2012, the Dutch government has vigorously promoted its open data strategy, with ProRail and NS successively opening the NDOV (Nationale Data Openbaar Vervoer) platform, providing GTFS-format timetable data and real-time train position information based on the BISON protocol. The depth and breadth of this data openness is leading globally.
Developers can typically obtain key information such as train timetables, real-time positions, and route topology through these public APIs. Worth mentioning here is the GTFS (General Transit Feed Specification) standard — originally co-developed by Google and Portland's transit agency in 2005, it has since become the de facto global standard for public transit data exchange. GTFS is divided into a static specification (timetables, routes, stops) and a real-time specification (GTFS-RT, real-time positions and arrival predictions based on Protocol Buffers). The Dutch open transit data platform provides both formats, allowing developers to parse data from all national public transport operators in a standardized way. This standardization dramatically lowers the development barrier — the same parsing code can theoretically work with transit system data from thousands of cities worldwide. The first step for a train map simulator is precisely to interface with these data sources, transforming structured timetable data into dynamic points that can move across a map.
You might not have noticed that the word "Simulator" in the name hints that it may not rely entirely on real-time GPS positioning data, but instead uses timetable-based interpolation — calculating a train's position at any given moment based on departure and arrival times between two stations. The basic principle of this Timetable Interpolation technique is: given that a train departs station A at time t1 and arrives at station B at time t2, use linear interpolation or more complex ease-in-out functions to calculate the train's position ratio along the route at any time t. Advanced implementations consider acceleration and deceleration curves — accelerating when leaving a station, decelerating when approaching one, and maintaining constant speed in between — which more closely approximates real train kinematics. Compared to pure GPS positioning approaches, the interpolation method doesn't depend on the reporting frequency of onboard positioning equipment, avoiding the "jumping" artifacts caused by data packet loss and latency, producing visually smoother animation. This method ensures trains move fluidly on the map even during data gaps or network delays, making it a common technical strategy in many transportation visualization projects.
Geographic Rendering and Performance Optimization
Drawing trains on a map and making them move smoothly along actual rail track trajectories requires precise route geometry data. This typically comes from railway line segments annotated in open-source geographic databases like OpenStreetMap. Railway data in OpenStreetMap (OSM) is annotated using the 'railway' tag system, containing rich infrastructure information including track segments (rail), platforms (platform), signals (signal), and more. The OSM railway data quality in the Netherlands is extremely high, covering the precise geometry of virtually all operational lines.
Developers need to handle coordinate projection conversion, path smoothing algorithms, and real-time rendering performance for large numbers of dynamic elements. Regarding coordinate projection, the WGS84 geographic coordinates (latitude/longitude) used by OSM need to be converted to Web Mercator projection coordinates (EPSG:3857) for planar rendering. Additionally, railway route geometry data typically needs simplification via the Douglas-Peucker algorithm or Bézier curve fitting to reduce the number of coordinate points while maintaining visual fidelity.
When hundreds of trains are simultaneously moving on the map, browser-side rendering optimization becomes critical. Common technical approaches include:
- WebGL Accelerated Rendering: Leveraging GPU parallel computing capabilities to handle large numbers of dynamic primitives. WebGL (Web Graphics Library) is a browser graphics API based on OpenGL ES 2.0 that allows web pages to directly invoke GPU hardware-accelerated rendering. In transportation visualization scenarios, WebGL's advantage lies in its ability to use shader programs to process position calculations and drawing of thousands of dynamic primitives in parallel. Modern map visualization libraries like Deck.gl, Mapbox GL JS, and Three.js are all built on WebGL, providing out-of-the-box large-scale point and line rendering capabilities. Compared to traditional SVG or Canvas 2D approaches, WebGL offers a 10-100x performance advantage when handling more than 1,000 simultaneously moving entities — crucial for scenarios that need to display hundreds of trains operating across the entire Dutch network.
- Canvas 2D Layered Drawing: Separating the static base map from dynamic trains to reduce redraw overhead
- Viewport Culling: Only rendering trains within the currently visible area to reduce computational load
- LOD (Level of Detail) Strategy: Simplifying train icon representations at lower zoom levels
Practical Value of Open Data
Government Open Data Empowering Individual Creation
The most thought-provoking aspect of projects like this is how they demonstrate the application potential of government Open Data. When public sector organizations are willing to release transit operations data, independent developers, tech enthusiasts, and even researchers can create applications more creative than official offerings. The Netherlands leads Europe in open transit data, which explains why Dutch railway and transit visualization projects continue to emerge one after another.
From a broader perspective, transportation data visualization isn't just aesthetically pleasing — it helps people intuitively understand the operational pulse of cities and nations. Trains flow through the rail network like blood through vessels, revealing infrastructure density and operational efficiency.
Geek Culture and Interest-Driven Development
In the tech community, projects like this gain attention precisely because they embody pure technical joy. Free from commercial monetization pressures, they're driven solely by the curiosity of "I wonder if I can build this." This interest-driven creation often spawns unexpected technical solutions and visual effects, and remains a vital source of energy keeping the entire open-source community vibrant.
Extended Application Directions from Visualization
A railway simulator's value extends far beyond visual appreciation. Based on the same data and visualization technology foundation, many practically meaningful applications can be derived:
- Delay Analysis and Prediction: Comparing timetables with real-time data to intuitively show which lines and time periods are most prone to delays, and even building predictive models
- Network Resilience Assessment: Simulating the cascading effects on the entire railway network when a hub station or critical segment fails
- Dispatch Optimization Research: Providing visualization-assisted tools for railway dispatch decision-making
- Education and Public Outreach: Helping the general public understand the scheduling logic and operational patterns of complex transportation systems
These extended directions represent the key path for visualization projects to evolve from "technical toys" to "practical tools."
Insights for Developers
The Dutch Train Map Simulator reflects several noteworthy technology trends: increasingly mature open data ecosystems, continuously strengthening browser-side visualization capabilities, and progressively lower barriers to Geographic Information System (GIS) technology. For any developer interested in data visualization, GIS applications, or frontend rendering performance optimization, projects like this serve as excellent learning and practice examples.
If you're curious about how a country's railway system actually operates through space and time, consider starting with a small simulator like this to explore the unique possibilities woven from data and code.
Related articles

Bias and Double Standards in AI Content Moderation: Technical Roots and Solutions
An in-depth analysis of bias and double standards in AI content moderation systems, exploring technical roots including training data flaws, annotation subjectivity, and rule design issues, with solutions for building fairer systems.

Altman Says AI Won't Bring a 4-Day Work Week — The Internet Fires Back
OpenAI CEO Sam Altman says AI won't bring a 4-day work week because people like being busy. Reddit erupts, arguing that enjoying busyness and being forced to work are fundamentally different things.

The State of Reinforcement Learning in Montezuma's Revenge: From Exploration Challenges to General Intelligence
In-depth analysis of Montezuma's Revenge in RL research: reviewing Go-Explore and RND breakthroughs, and the shift toward sample efficiency and generalist agents.