The Transitland Global Transit Map is drawn from these tiles.
Documentation
Transitland v2 Vector Tiles
Last updated
Available onExplorerPay As You GoHobbyist/AcademicEnterprisePlans and pricing
Transitland publishes the routes and stops of every active feed version as two tilesets in Mapbox Vector Tile (MVT) format. Each feature carries the attributes to label, style, filter, and link it: names, colors, route types, operators, and Onestop IDs. Use a feature's Onestop ID to look up the full route or stop in the REST or GraphQL API.
Requests
Tiles are addressed by zoom, column, and row in the XYZ scheme:
https://transit.land/api/v2/tiles/routes/tiles/{z}/{x}/{y}.pbf
https://transit.land/api/v2/tiles/stops/tiles/{z}/{x}/{y}.pbf
Send your API key in the apikey header, or as the apikey query parameter for clients that cannot set headers. To get a key, see Signing up for an API key.
| Status | Meaning |
|---|---|
200 | The tile, as application/x-protobuf, gzip-encoded |
204 | No features in this tile, or a zoom past the tileset's maximum |
400 | A column or row outside the zoom level's range |
401 | Missing or unknown API key |
429 | Rate limit or fair-use limit reached |
Each tileset also has a TileJSON document, at https://transit.land/api/v2/tiles/routes and https://transit.land/api/v2/tiles/stops, which a MapLibre source can use as its url. Its tile URLs do not include your key, so send the key with each tile request, for example with MapLibre's transformRequest option. An OpenAPI description of both tilesets is at https://transit.land/api/v2/tiles/openapi.json.
Freshness and IDs
The tiles are rebuilt daily from the active feed versions, so they can lag the REST and GraphQL APIs by up to a day.
Each feature's ID is Transitland's internal integer ID for the route or stop, so MapLibre can use feature state without promoteId. Internal IDs change when a feed version is replaced. To store or link to a route or stop, use its onestop_id.
Lists and objects are stored as JSON strings. Parse them in your code, for example in a click handler. Their fields are listed under Show fields. An attribute with no value, such as a blank route_short_name, is omitted from the feature.
Route tiles
GEThttps://transit.land/api/v2/tiles/routes/tiles/{z}/{x}/{y}.pbf
| Layer | routes, the source-layer a style names |
|---|---|
| Features | One line feature per route. A route's attributes are its GTFS fields, its agency and operator, and its extent. |
| Geometry | The route's top-ranked representative shape at zooms 0 to 7, and all of its representative shapes at 8 to 14. A decoder reports a feature as LineString or MultiLineString by how many lines it has in the tile, so a style filter should match both. |
| Zooms | 0 to 14. Set maxzoom: 14 on the source, so a map zoomed in further draws from zoom 14 tiles. At zooms 0 to 7, crowded routes are clustered; see clustered. |
| Feature ID | Internal route ID. Changes when the feed version is replaced; store onestop_id instead. |
onestop_stringid - Onestop ID of the route, stable across feed versions. See Onestop IDs.
Example:
r-9q9-yl~s route_stringlong_ name - GTFS
routes.route_long_name. Absent when blank in the feed.Example:
Antioch to SFIA/Millbrae route_stringrequiredcolor - GTFS
routes.route_color, lowercase, with a leading#.#alone when the feed has no color, which is not a valid color; styles need a fallback.Example:
#ffff33 route_integerrequiredtype - GTFS
routes.route_type, including extended types such as 702 (express bus). See Route vehicle types.Example:
1 route_integerrequiredtype_ basic - Basic GTFS route type of
route_type, such as 3 (bus) for 702 (express bus). See Route vehicle types.Example:
1 agency_stringid - GTFS
agency.agency_idof the route's agency. Absent when blank in the feed.Example:
BART operator_stringname - Name of the Transitland operator of the route's agency, which can differ from
agency_name. Absent when the agency has no operator.Example:
Bay Area Rapid Transit operator_stringonestop_ id - Onestop ID of the operator. Absent when the agency has no operator. See Agencies and operators.
Example:
o-9q9-bart headway_integerrequiredsecs - Shortest typical headway of the route, in seconds, across weekday, Saturday, and Sunday service in both directions.
100000when unknown.Example:
960 generatedbooleanrequired- True when the geometry was generated from stop locations because the feed has no shapes for the route. See Route geometries.
Example:
false geometry_numbermax_ segment_ length - Longest distance between consecutive points of the geometry, in meters. Large values suggest a generated or simplified line.
Example:
1204.2 bboxstring (JSON array)required- Extent of the route's full geometry, as
[west, south, east, north]. Tiles clip routes; use this to fit a map to the whole route.Example:
[-122.57092,37.77622,-122.39602,38.11394] agency_string (JSON array)bbox - Extent of the agency's stops, or its routes when it has no stops with locations, as
[west, south, east, north]. Absent when the agency has neither.Example:
[-122.74045,37.77761,-122.31666,38.47208] operator_string (JSON array)bbox - Extent of all of the operator's agencies, as
[west, south, east, north]. Absent when the agency has no operator.Example:
[-122.74045,37.77761,-122.31666,38.47208] placesstring (JSON array)required- Countries and states or provinces the route's stops are in, the place with the most stops first. See Places.
Example:
[{"adm0_name":"United States of America","adm0_iso":"US","adm1_name":"California","adm1_iso":"US-CA"}] clusteredboolean- Zooms 0 to 7 only. True when tippecanoe dropped nearby routes to keep the tile under its size limit and this feature represents them. Other attributes describe this route only.
Example:
true
Stop tiles
GEThttps://transit.land/api/v2/tiles/stops/tiles/{z}/{x}/{y}.pbf
| Layer | stops, the source-layer a style names |
|---|---|
| Features | One point feature per stop, station, entrance, node, and boarding area. A stop's attributes are its GTFS fields, its place, and the agencies, operators, and routes serving it. |
| Geometry | Point. |
| Zooms | 0 to 14. Set maxzoom: 14 on the source, so a map zoomed in further draws from zoom 14 tiles. All stops from zoom 12. Below zoom 12, tiles hold a sample that shrinks at each lower zoom. |
| Feature ID | Internal stop ID. Changes when the feed version is replaced; store onestop_id instead. |
onestop_stringrequiredid - Onestop ID of the stop, stable across feed versions. See Onestop IDs.
Example:
s-9q9p19ut0x-12thstreet~oaklandcitycenter stop_stringname - GTFS
stops.stop_name. Absent when blank in the feed, as is common for nodes and boarding areas.Example:
12th Street / Oakland City Center location_integerrequiredtype - GTFS
stops.location_type. See Stop location types.Values 0Stop or platform 1Station 2Entrance or exit 3Generic node 4Boarding area feed_stringrequiredonestop_ id - Onestop ID of the feed the stop comes from. See Source feeds.
Example:
f-9q9-bart feed_stringrequiredversion_ sha1 - SHA1 of the source feed version: the feed's active version when the tiles were built. See Static GTFS feed versions.
Example:
8aafa62e9ffcb5a3d7c3a8f4ef0be7f5a7c2c4d1 parent_string (JSON object)station - The station this stop belongs to, from GTFS
stops.parent_station. Absent when the stop has none. See Stop hierarchies.parent_station.idintegerrequired- Internal ID of the station. Not stable across feed versions.
Example:
32915959 parent_station.onestop_stringrequiredid - Onestop ID of the station.
Example:
s-9q9p19ut0x-12thstreet~oaklandcitycenter parent_station.stop_nullable stringrequiredname - GTFS
stops.stop_nameof the station.nullwhen blank.Example:
12th Street / Oakland City Center
adm0_stringname - Country containing the stop. Absent outside any country.
Example:
United States of America adm1_stringname - State or province containing the stop. Absent outside any state or province.
Example:
California operator_stringname - Operator of the stop's first agency that has one. Absent when no agency has an operator.
Example:
Bay Area Rapid Transit operator_stringonestop_ id - Onestop ID of that operator. See Agencies and operators.
Example:
o-9q9-bart agenciesstring (JSON array)required- Agencies with routes serving the stop, or serving a station's platforms. Empty when no route serves it.
Example:
[{"id":3804935,"agency_id":"BART","agency_name":"Bay Area Rapid Transit","onestop_id":"o-9q9-bart"}] agency_string (JSON array)requiredonestop_ ids - Onestop IDs of the operators of
agencies, sorted, for filtering stops by operator.Example:
["o-9q9-bart"] route_string (JSON array)requiredonestop_ ids - Onestop IDs of the routes serving the stop, sorted.
Example:
["r-9q9-yl~s","r-9q9-rd~s"] route_string (JSON array)requiredtypes - The distinct
route_typevalues of the routes serving the stop, sorted.Example:
[1] route_string (JSON array)requiredtypes_ basic - The distinct
route_type_basicvalues of the routes serving the stop, sorted.Example:
[1] routesstring (JSON array)required- Routes serving the stop, with enough attributes to list and style them without the route tiles. Routes without geometry appear only in
route_onestop_idsandroute_types.routes.idintegerrequired- Internal ID of the route, its route tile feature's ID. Not stable across feed versions.
Example:
8472496 routes.route_nullable stringrequiredshort_ name - GTFS
routes.route_short_name.nullwhen blank in the feed.Example:
Yellow-S routes.route_nullable stringrequiredlong_ name - GTFS
routes.route_long_name.nullwhen blank in the feed.Example:
Antioch to SFIA/Millbrae routes.operator_nullable stringrequiredname - Name of the route's operator.
null, with the otheroperator_fields, when the route's agency has no operator.Example:
Bay Area Rapid Transit routes.operator_nullable stringrequiredshort_ name - Short name of the route's operator.
nullwhen it has none.Example:
BART