GuidesAPI Reference
Guides

transit V2

Content: transit
Geometry: line, polygon
Zoom: 5–17

The transit layer provides information about public transportation systems, such as buses, trains, subways, and other modes of public transit. The features of this layer enable developers to integrate public transit data into applications or services, allowing users to plan routes, view schedules, and obtain real-time information about public transportation options.

The following figure illustrates sample features of the transit layer rendered from the data:

Sample transit layer features in Tokyo

Transit line features become visible from zoom level 6 onwards, while platform polygons are added at zoom level 14 and higher.

To optimize efficiency, there are 2 levels of features consolidation (LOC):

  • LOC 1: There is one line geometry feature for each pair of kind and kind_detail values. It contains all line names of this kind and kind_detail on this segment concatenated into one string. This LOC can be used to display a less detailed network (one line per kind_detail) and to display all concatenated labels for this kind_detail. These concatenated labels can even be used to display all well-formatted labels as a row for LOC 2 lines.
  • LOC 2: There is one additional line geometry feature for each PT line segment which has the same kind, kind_detail, colour. In case several PT lines with the same operator supplied colour/type on the same segment, the geometry is merged into one line and all line names are added as a list. Client can do simple parallel line rendering by multiplying the logical offset with the pixel offset defined in the style.

Every feature in the transit layer includes a set of properties that define it, regardless of the specific transit type it represents.

Consider the following sample parameters for a transit features representing common transit route segment line geometry.

The Tohoku Line intercity line is represented by the color #00BB85, while the Takasaki Line and Utsunomiya Line intercity lines are represented by the color #FF871C:

LOC 1:

...
"kind": "train",
"kind_detail": "intercity",
"min_zoom": 8,
"sort_rank": 436,
"name": "宇都宮線  ·  東北本線  ·  高崎線",
"name:en": "Takasaki Line  ·  Tohoku Line  ·  Utsunomiya Line",
"name:ja": "宇都宮線  ·  東北本線  ·  高崎線",
"name:ko": "다카사키 선  ·  도호쿠 본선  ·  우쓰노미야 선",
"name:zh": "宇都宮線  ·  東北本線  ·  高崎線",
...

LOC 2:

...
"source": "ipc",
"kind": "train",
"kind_detail": "intercity",
"num_lines": 2,
"min_zoom": 8,
"logical_offset": 0,
"sort_rank": 436,
"ref": ";東北本線;",
"name": "東北本線",
"name:en": "Tohoku Line",
"name:ja": "東北本線",
"name:ko": "도호쿠 본선",
"name:zh": "東北本線",
"colour": "#00BB85",
"direction": "F",
"operator": "101037_a7e604b",
...
...
"source": "ipc",
"kind": "train",
"kind_detail": "intercity",
"num_lines": 2,
"min_zoom": 8,
"logical_offset": 1,
"sort_rank": 436,
"ref": ";高崎線;宇都宮線;",
"name": "宇都宮線  ·  高崎線",
"name:en": "Takasaki Line  ·  Utsunomiya Line",
"name:ja": "宇都宮線  ·  高崎線",
"name:ko": "다카사키 선  ·  우쓰노미야 선",
"name:zh": "宇都宮線  ·  高崎線",
"colour": "#FF871C",
"direction": "F;F",
"operator": "101037_a7e604b;101037_a7e604b",
...

Properties

kind | kind_detail | colour | direction | logical_offset | name | name:{language_code} | num_lines | operator | ref | text_colour

Properties specific to Japan - core map

height

Common properties

sort_rank | min_zoom

Common properties specific to Japan - core map

source


kind

Type: string
Always present

The general type of transit feature.

Values

ValueGeometryZoomDescription
aerialline10–17A transportation system that operates above ground level, such as an aerial tramway or gondola.
ferryline10–17A transportation system that operates short- and long-distance boat services.
funicularline10–17A transportation system that uses cable-operated cars on steep inclines.
light_railline8–17A type of urban rail transit that operates with light capacity and shares tracks with other vehicles. The actual sort_rank value depends on the specific kind_detail for this feature instance.
monorailline10–17A railway system where the trains run on a single rail.
subwayline8–17An underground or elevated railway system typically found in urban areas.
trainline5–17A general term referring to a mode of transportation that runs on tracks, typically used for intercity or regional travel. The actual sort_rank value depends on the specific kind_detail for this feature instance.

Values specific to Japan - core map

ValueGeometryZoomDescription
subway_station_platformpolygon14–17(sort_rank: 385) - Platform of a subway station.

kind_detail

Type: string
Present when kind is: aerial, ferry, funicular, light_rail, monorail, subway, train

This property provides additional details about the kind of transit feature. This parameter is relevant only within the context of the line geometry type.

ValueDescriptionAssociated kind
aerialDenotes aerial cable car or gondola lines for the aerial kind.aerial
ferryDenotes short- and long-distance boat lines for the ferry kind.ferry
funicularIndicates funicular lines for the funicular kind.funicular
high_speedIndicates high-speed railroad lines with the train kind.train
intercityRepresents intercity railroad lines with the train kind.train
monorailDenotes monorail lines for the monorail kind.monorail
regionalDenotes regional railroad lines with the train kind.train
suburbanIndicates suburban rail lines for the light_rail kind.light_rail
subwayRepresents subway lines for the subway kind.subway
touristicIndicates touristic railroad lines with the train kind.train
tramRepresents tram lines for the light_rail kind.light_rail

colour

Type: string
Optional

A hex value representing the color for the routes valid on this line. In the example, there are 3 intercity routes on a transit segment with 2 different colors. There is separate feature for each color. The first intercity line feature with color #00BB85 corresponds to the 東北本線 (Tohoku Line) route, and the second feature with color #FF871C corresponds to the 宇都宮線, 高崎線 (Takasaki Line, Utsunomiya Line) routes.


direction

Type: string
Array
Optional

The parameter direction specifies all the directions of the routes that are valid on a line segment for particular line color. The values are provided as semicolon-separated values. The following conventions are used:


logical_offset

Type: int
Range: 0–20
Present when kind is: aerial, ferry, funicular, light_rail, monorail, subway, train

A line offset calculated across all lines in a segment with the same kind and kind_detail, in the range from 0 to num_lines. In the example, the first intercity line feature has \"logical_offset\": 0, and the second feature has \"logical_offset\": 1. This parameter is relevant only within the context of the line geometry type.


name

Type: string
Present when kind is: aerial, ferry, funicular, light_rail, monorail, subway, train

A dot-separated sorted list of all the route names valid on this transit line segment. In the example, the line has 3 intercity routes: 宇都宮線, 東北本線, and 高崎線. This parameter is relevant only within the context of the line geometry type. A dot-separated list of the route names valid on this transit line segment with the same colour. In the example, the first intercity line feature has 1 intercity route: 東北本線, and the second feature has 2 routes: 宇都宮線 and 高崎線. This parameter is relevant only within the context of the line geometry type. It has alphabetical order.


Type: string
Present when kind is: aerial, ferry, funicular, light_rail, monorail, subway, train · Present when kind_detail is: aerial, ferry, funicular, monorail, regional, subway, tram

Localized dot-separated sorted list of the route names. For example, in English, the routes from the example are referred to as Takasaki Line, Tohoku Line, and Utsunomiya Line. The same routes are also provided in other languages as identified by ISO 639-1 two-letter language codes.


num_lines

Type: int
Range: ≥ 1
Present when kind is: aerial, ferry, funicular, light_rail, monorail, subway, train

Count of line features in a segment with the same kind and kind_detail.


operator

Type: string
Array
Optional

A semicolon-separated list of operator IDs for the routes valid on this line segment for particular color. For example, \"operator\": \"101037_a7e604b;101037_a7e604b\". The first operator ID corresponds to the operator of the 高崎線 (Takasaki Line) route, and the second operator ID corresponds to the operator of the 宇都宮線 (Utsunomiya Line) route.


ref

Type: string
Array
Optional

A semicolon-separated list of route names valid on this transit line segment with the same colour in order according to source. This parameter is relevant only within the context of the line geometry type.


text_colour

Type: string
Array
Optional

Colors used for drawing the text of reference values for the routes valid on this line. It follows the same format as colour. This parameter is relevant only within the context of the line geometry type.

Properties specific to Japan - core map


height

Type: float
Present when kind is: subway_station_platform · Present when zoom is: 14, 15, 16

Example values: 12.400000, 12.000000, 24.800000, 13.400000, 17.800000

Common properties


sort_rank

Type: int
Always present

The ordering of features, which determines which features are rendered "on top of" other features, can be an important issue when rendering maps. To assist map rendering, there is a sort_rank property on some features that suggests in what order the features should appear.

A feature with a higher sort_rank value is displayed on top of feature with a lower sort_rank value.

Values

ValueAssociated kind
411ferry
429light_rail
430funicular
431monorail
432subway
433light_rail
435train
436train
437train
442aerial
444train

Values specific to Japan - core map

ValueAssociated kind
385subway_station_platform

min_zoom

See min_zoom.

Common properties specific to Japan - core map


source

See source.