Source Copenhagen transit data from Rejseplanen GTFS
- Replace OSM Overpass transit data with the Rejseplanen GTFS feed (routes keyed by (agency, short name); styles from modes.yaml) - Draw one shape per (style, ref, direction), choosing the shape that serves the most in-area stops so lines pass the stops we show - Collapse stops by names (verified unambiguous); prune stops whose serving refs have no drawn line within 300 m - Patch Københavns Havn + Nordhavn into the area polygon so ferry routes and sub-harbour metro tunnels survive clipping; 100 m buffer closes relation boundary slivers - Drop OSM download pipeline; keep tiled basemap
This commit is contained in:
@@ -5,5 +5,22 @@
|
||||
{"name": "Kobenhavns Kommune", "id": 2192363},
|
||||
{"name": "Frederiksberg Kommune", "id": 2186660},
|
||||
{"name": "Amager", "id": 5175924}
|
||||
],
|
||||
"waterways": [
|
||||
{
|
||||
"name": "Kobenhavns Havn + Nordhavn",
|
||||
"comment": "The harbour channel and Nordhavn basin belong to the City Pass zone in any practical sense: the metro tunnels under it (M1/M2/M4), harbour ferries 991/992 sail it, and the fade-out should not start mid-harbour. The kommune boundary relations exclude all water, so this polygon is patched in.",
|
||||
"ring": [
|
||||
[12.532, 55.640],
|
||||
[12.545, 55.666],
|
||||
[12.565, 55.680],
|
||||
[12.585, 55.715],
|
||||
[12.612, 55.717],
|
||||
[12.632, 55.685],
|
||||
[12.632, 55.660],
|
||||
[12.600, 55.636],
|
||||
[12.560, 55.634]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,40 +1,34 @@
|
||||
# Mapping of map modes to OSM route filters, GTFS route types, and style keys.
|
||||
# `style` references a key in styling.yaml.
|
||||
# Mapping of map styles to GTFS agency / route_type filters.
|
||||
#
|
||||
# OSM filter keys map directly to Overpass tag filters. A key suffixed with
|
||||
# `_neq` emits a negated tag filter (["k"!="v"]); any other key emits an
|
||||
# equality filter (["k"="v"]). The bbox is appended by download_osm.py.
|
||||
# Used by prepare.py to classify GTFS routes (lines layer) and the routes
|
||||
# serving each stop pole (stops/stations layers). Style keys are referenced
|
||||
# by styling.yaml (palette, zorder, widths).
|
||||
#
|
||||
# S-tog are tagged route=light_rail in OSM (NOT route=train); they are scoped
|
||||
# by network="Takst Sjælland". The separate `light_rail` mode catches other
|
||||
# light rail (e.g. Hovedstadens Letbane, opened Aug 2026) via network!=Takst.
|
||||
# GTFS route_type: 0=tram,1=subway,2=rail,3=bus,4=ferry.
|
||||
# `agencies` matches GTFS agency_name from agency.txt.
|
||||
# `route_types` optionally restricts GTFS route_type values, including the
|
||||
# extended codes used in this feed (109 = S-tog suburban rail, 700/715 =
|
||||
# Movia bus service types). Without `route_types`, all of the agency's
|
||||
# routes match (e.g. Movia including harbour ferries 991/992).
|
||||
#
|
||||
# ORDER MATTERS: the styles listed here are also the priority order when a
|
||||
# pole is served by several modes (e.g. S-tog and regional trains share
|
||||
# platforms at hub stations — the higher style wins).
|
||||
modes:
|
||||
subway:
|
||||
osm:
|
||||
route: subway
|
||||
gtfs_route_type: 1
|
||||
style: metro
|
||||
metro:
|
||||
agencies: [Metroselskabet]
|
||||
s_tog:
|
||||
osm:
|
||||
route: light_rail
|
||||
network: "Takst Sjælland"
|
||||
gtfs_route_type: 2
|
||||
style: s_tog
|
||||
agencies: [DSB S-tog]
|
||||
route_types: [109, 2]
|
||||
light_rail:
|
||||
osm:
|
||||
route: light_rail
|
||||
network_neq: "Takst Sjælland"
|
||||
gtfs_route_type: 2
|
||||
style: light_rail
|
||||
agencies: [Hovedstadens Letbane]
|
||||
regional:
|
||||
osm:
|
||||
route: train
|
||||
gtfs_route_type: 2
|
||||
style: regional
|
||||
agencies: [DSB, Lokaltog A/S, Skånetrafiken, Snälltåget AB, DSB Vores Tog]
|
||||
route_types: [2]
|
||||
ferry:
|
||||
# harbour buses 991/992 (route_type 4); their shapes cross the harbour
|
||||
# water and are intentionally NOT clipped to the land area polygon
|
||||
agencies: [Movia]
|
||||
route_types: [4]
|
||||
bus:
|
||||
osm:
|
||||
route: bus
|
||||
network: Movia
|
||||
gtfs_route_type: 3
|
||||
style: bus
|
||||
agencies: [Movia]
|
||||
route_types: [3, 700, 715]
|
||||
|
||||
@@ -4,13 +4,15 @@
|
||||
|
||||
zorder:
|
||||
bus: 1
|
||||
s_tog: 2
|
||||
light_rail: 3
|
||||
regional: 4
|
||||
metro: 5
|
||||
ferry: 2
|
||||
s_tog: 3
|
||||
light_rail: 4
|
||||
regional: 5
|
||||
metro: 6
|
||||
|
||||
line_width: # body width in points (outline = body + outline_width)
|
||||
bus: 0.8
|
||||
ferry: 1.4
|
||||
s_tog: 2.0
|
||||
light_rail: 2.0
|
||||
regional: 1.8
|
||||
@@ -21,14 +23,16 @@ outline_color: "#2b2b2b"
|
||||
|
||||
alpha:
|
||||
bus: 0.45
|
||||
ferry: 1.0
|
||||
s_tog: 0.95
|
||||
light_rail: 0.95
|
||||
regional: 0.9
|
||||
metro: 1.0
|
||||
|
||||
# Fallback palette when no GTFS route_color and no OSM colour tag are present.
|
||||
# Metro / S-tog values mirror the OSM colour tags (verified). Regional trains
|
||||
# have no OSM colour, so the palette supplies one.
|
||||
# Line colours. The Rejseplanen GTFS feed leaves route_color empty for the
|
||||
# Copenhagen operators, so in practice everything resolves to this palette.
|
||||
# Metro / S-tog values mirror the official line colours; regional trains and
|
||||
# the light rail have no operator colour, so the palette supplies one.
|
||||
palette:
|
||||
metro:
|
||||
M1: "#008d41"
|
||||
@@ -52,6 +56,8 @@ palette:
|
||||
C: "#16a085"
|
||||
S: "#2a6fb5"
|
||||
default: "#c8a80e"
|
||||
ferry:
|
||||
default: "#2aa8e0" # harbour-bus blue
|
||||
|
||||
bus_filters:
|
||||
# ref-based bus categorisation (regex applied to route ref)
|
||||
@@ -73,11 +79,8 @@ basemap:
|
||||
stations:
|
||||
show: true # draw station markers (symbols without text)
|
||||
styles: [metro, s_tog, regional, bus]
|
||||
stop_cluster_m: # merge same-name stops within this distance (per mode)
|
||||
metro: 200 # covers platform/entrance spread (~170m max)
|
||||
s_tog: 400 # covers platform/entrance spread (~380m max)
|
||||
regional: 500 # covers platform spread (~475m max)
|
||||
bus: 100 # opposite sides of road, wide boulevards
|
||||
# NOTE: stops/stations arrive pre-collapsed from prepare.py (name-keyed,
|
||||
# one point per stop/station) — no clustering configuration lives here.
|
||||
marker:
|
||||
shape: circle # circle | square
|
||||
fill: white
|
||||
|
||||
Reference in New Issue
Block a user