I need to convert a Shapefile (.shp), shx or dbf to GTFS (General Transit Feed Specification https://developers.google.com/transit/gtfs/reference).

Do you know any tool for this issue?

closed as too broad by PolyGeo Jun 27 '18 at 5:52

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Is there a specific GTFS component that you're having difficulty with? This is very broad otherwise. There will be no point and click tool to do it for you, unless your shapefile somehow already conforms to the specification (and that seems extremely unlikely given the specification consists of multiple files, most of which are not spatial). – alphabetasoup Sep 22 '15 at 2:25

I'd do it using Python. It's going to be custom, I reckon.

There's a shapefile reading library: https://code.google.com/p/pyshp/

And you're writing CSVs. Doing it with Python means it's repeatable too!

  • 2
    it's that or add the required fields in a program like QGIS and export the attribute table to csv... writing a script gives you the benefit of being able to do this again when the data updates but also documents in a repeatable way how the data is created, any typos or non-conformance can be rectified and overwritten quickly, whereas exporting the table is going to take as long every time and is more likely to be forgotten or misstepped. – Michael Stimson Sep 22 '15 at 3:56

Safe Software's FME Version 2016 can read Shapefiles (among numerous other formats) and write GTFS etc.


You are welcome to evaluate FME and make use of our support to see if this solution is suitable.

Disclosure: I am the European Services Manager for Safe Software Inc


ArcGIS Pro 2.2 introduces a Features To GTFS Stops tool which:

Converts a feature class to a GTFS stops.txt file for a GTFS public transit dataset.

Note that:

A file geodatabase feature class is recommended for tool input instead of a shapefile because some field names allowed by the GTFS specification are longer than the maximum of 10 characters allowed for shapefile field names.

Disclosure: I am a consultant that makes a living selling solutions using ESRI products.

Not the answer you're looking for? Browse other questions tagged or ask your own question.