GTFS to MATSim Conversion

Convert GTFS feeds to MATSim transitSchedule.xml and transitVehicles.xml.

1|Updated Oct 21, 2025
One-click install
npx skills add https://github.com/ro9er117911/matsim-example-project --skill gtfs-to-matsim-conversion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: GTFS to MATSim Conversion
Source: https://github.com/ro9er117911/matsim-example-project/tree/main/.claude/skills/matsim-skill/5-gtfs-conversion
Command: npx skills add https://github.com/ro9er117911/matsim-example-project --skill gtfs-to-matsim-conversion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Transforming raw GTFS data into MATSim-compatible formats can be a complex, multi-step process. This Skill automates the conversion, coordinate transformation, and validation of GTFS feeds, ensuring your public transit data is ready for simulation without manual data wrangling.

Core Features & Use Cases

  • Seamless GTFS Conversion: Convert GTFS zip files into MATSim transitSchedule.xml and transitVehicles.xml.
  • Coordinate Transformation: Automatically transform GTFS coordinates (WGS84) to your target MATSim CRS (e.g., EPSG:3826).
  • GTFS Input Validation: Ensure your GTFS feed is valid and complete before conversion.
  • Use Case: You've downloaded a GTFS feed for Taipei Metro. Use this Skill to convert taipei_metro.zip into MATSim format, transforming coordinates to EPSG:3826, and generating the necessary transitSchedule.xml and transitVehicles.xml files.

Quick Start

Convert the GTFS data from 'pt2matsim/data/taipei_metro.zip' to MATSim format, using 'pt2matsim/output_v1/network.xml.gz' as the base network, and save the output to 'pt2matsim/output_v2', targeting CRS EPSG:3826.

Frequently Asked Questions about GTFS to MATSim Conversion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert GTFS data to MATSim format?

Convert GTFS data to MATSim format by using tools like GtfsToMatsim to transform your GTFS zip file (containing stops.txt, routes.txt, trips.txt, stop_times.txt) into transitSchedule.xml and transitVehicles.xml files compatible with MATSim simulation.

Can I transform GTFS coordinates to a different CRS during conversion?

Yes, coordinate transformation is built into the conversion process. ConvertGtfsCoordinates automatically transforms GTFS coordinates from WGS84 to your target CRS (such as EPSG:3826) as part of the conversion workflow.

What files do I need before converting GTFS to MATSim?

You need a GTFS zip file containing stops.txt, routes.txt, trips.txt, and stop_times.txt, plus an existing MATSim network file (network.xml.gz) to serve as the base for mapping public transit data.

How do I validate GTFS data before conversion?

GTFS input validation is performed automatically during the conversion process to ensure your feed is complete and valid, preventing data wrangling issues before MATSim output generation.

What output files does GTFS to MATSim conversion produce?

Conversion produces three key MATSim files: transitSchedule.xml (defines transit routes and schedules), transitVehicles.xml (describes transit vehicles), and population.xml, saved to your specified output directory.

Does this conversion work for public transit networks at city scale?

Yes, GTFS to MATSim conversion is applicable to various city scales and CRS targets, supporting workflows from small metro systems to large regional public transit networks.