Skip to content

Expand and render OSM aerialways and stations#625

Open
candux wants to merge 2 commits into
protomaps:mainfrom
candux:fix/aerialway-support
Open

Expand and render OSM aerialways and stations#625
candux wants to merge 2 commits into
protomaps:mainfrom
candux:fix/aerialway-support

Conversation

@candux

@candux candux commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Overview

Protomaps currently exports only aerialway=cable_car. The other documented aerialway line types are discarded, and the bundled styles do not render even the existing cable-car features.

For example, the Schauinslandbahn is correctly tagged as aerialway=gondola, so it is currently missing.

This PR expands aerialway extraction, adds explicitly mapped stations, and renders the resulting features in the bundled styles.

Changes

Feature Before After
aerialway=cable_car ways Exported Unchanged
Other documented aerialway ways Dropped Exported
Way kind_detail Hardcoded to cable_car Original aerialway value
Explicit station nodes Dropped Exported as POIs
Named station areas Dropped Exported as point-on-surface POIs
Aerialway lines in bundled styles Not rendered Rendered
Aerialway names Not rendered Localized line labels
Aerialway stations No dedicated icon Existing aerialway sprite
Pylons Dropped Unchanged
Untagged endpoints Not inferred as stations Unchanged

The tagging model and documented values are described by the OSM aerialway documentation and aerialway station documentation.

Line types

Minimum zoom Values
11 cable_car, gondola, mixed_lift
12 chair_lift
13 drag_lift, t-bar, j-bar, platter, rope_tow
14 magic_carpet, zip_line, goods

All line features use:

kind=aerialway
kind_detail=<original aerialway value>

Explicit stations use:

kind=station
kind_detail=aerialway

Stations retain the existing POI zoom and QRank behavior. The implementation does not infer stations from untagged line endpoints.

Styling

Property Treatment
Color Existing railway color
Opacity Existing railway opacity
Width Existing railway width curve
Distinction Longer dash pattern
Labels Localized line names
Stations Existing aerialway sprite
Railway stations Existing train_station sprite, unchanged

The data and style commits remain independently usable. Custom styles that already render kind=aerialway can use the expanded data without adopting the bundled style changes.

Baden-Württemberg comparison

Both archives were generated from the same Geofabrik extract.

Metric Before After
Unique aerialway ways 0 345
Aerialway stations 0 620
Archive size 664,928,838 bytes 664,947,675 bytes
Size increase 18,837 bytes (0.0028%)

The Schauinslandbahn is emitted as:

kind=aerialway
kind_detail=gondola

and rendered like this
image

AI assistance: these changes and tests were prepared with help from OpenAI Codex.

candux added 2 commits July 22, 2026 12:38
Before/after behavior:

| Feature | Before | After |
| --- | --- | --- |
| aerialway=cable_car ways | Exported as kind=aerialway | Unchanged |
| Other documented aerialway ways | Dropped | All 11 are exported |
| kind_detail for aerialway ways | Hardcoded to cable_car | Preserves the source aerialway value |
| Explicit station nodes | Dropped | kind=station, kind_detail=aerialway |
| Named station areas | Dropped | Point-on-surface POI with name |
| Untagged line endpoints | Not inferred | Unchanged |
| aerialway=pylon | Dropped | Unchanged |

The 11 newly supported line values are gondola, chair_lift, mixed_lift, drag_lift, t-bar, j-bar, platter, rope_tow, magic_carpet, zip_line, and goods. Their minimum zooms are tiered by visual importance. Stations use the existing POI zoom behavior.

References:

| Subject | Link |
| --- | --- |
| OSM aerialway values | https://wiki.openstreetmap.org/wiki/Key:aerialway |
| OSM station tagging | https://wiki.openstreetmap.org/wiki/Tag:aerialway%3Dstation |
| Schauinslandbahn example | https://www.openstreetmap.org/way/4040490 |

Tests:

| Coverage | Result |
| --- | --- |
| Existing cable_car and 11 added line values | kind and original kind_detail verified |
| Explicit station node | POI schema and min_zoom verified |
| Named station area | Point-on-surface name and schema verified |

Baden-Wuerttemberg comparison from the same Geofabrik extract:

| Metric | Before | After |
| --- | ---: | ---: |
| Unique aerialway ways | 0 | 345 |
| Aerialway stations | 0 | 620 |
| Archive size | 664,928,838 bytes | 664,947,675 bytes |
| Size increase | | 18,837 bytes (0.0028%) |

Schauinslandbahn way 4040490 is now emitted as kind=aerialway and kind_detail=gondola.

AI assistance: this change and its tests were prepared with help from OpenAI Codex.
Before/after behavior:

| Feature | Before | After |
| --- | --- | --- |
| roads kind=aerialway | Present for cable cars but not rendered | Rendered with a dashed line |
| Aerialway names | Not rendered | Localized line labels |
| Aerialway sprite artwork | Present but disabled | Enabled in light and dark manifests |
| Aerialway station icon | Not available | Used for station + aerialway POIs |
| Railway station icon | train_station | Unchanged |

Aerialway lines use the same color, opacity, and zoom-dependent width as rail infrastructure. A longer dash pattern distinguishes them without adding more visual weight.

The station icon expression selects aerialway only when kind=station and kind_detail=aerialway. Other stations continue to use train_station.

References:

| Subject | Link |
| --- | --- |
| OSM aerialway tagging | https://wiki.openstreetmap.org/wiki/Key:aerialway |
| Schauinslandbahn example | https://www.openstreetmap.org/way/4040490 |

Verification:

| Check | Result |
| --- | --- |
| Style tests | Passed |
| TypeScript | Passed |
| Biome | Passed |
| Style package build | Passed |
| Local Schauinslandbahn rendering | Visually inspected |

AI assistance: this change was prepared with help from OpenAI Codex.
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant