Copenhagen Phase 1: scaffolding + area + OSM download
- pyproject.toml with all deps (geopandas, contextily, partridge, etc.)
- config/: area.json (3 OSM boundary relations), modes.yaml (subway/s_tog/
light_rail/regional/bus, S-tog scoped to route=light_rail network=Takst),
styling.yaml (zorder/widths/colours/palette/mask/labels)
- build_area.py: fetch 3 relations via OSM API, stitch rings, dissolve to
area.gpkg/area.geojson (City Pass approximation)
- download_osm.py: per-mode Overpass (mirror+backoff, out geom + recurse for
stops), writes {mode}.gpkg (lines+stops) + query text
- download_gtfs.py / gtfs_to_geopackage.py: stubs (blocked on Rejseplanen)
- data/ gitignored (regenerable); output/ tracked
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# Mapping of map modes to OSM route filters, GTFS route types, and style keys.
|
||||
# `style` references a key in styling.yaml.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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.
|
||||
modes:
|
||||
subway:
|
||||
osm:
|
||||
route: subway
|
||||
gtfs_route_type: 1
|
||||
style: metro
|
||||
s_tog:
|
||||
osm:
|
||||
route: light_rail
|
||||
network: "Takst Sjælland"
|
||||
gtfs_route_type: 2
|
||||
style: s_tog
|
||||
light_rail:
|
||||
osm:
|
||||
route: light_rail
|
||||
network_neq: "Takst Sjælland"
|
||||
gtfs_route_type: 2
|
||||
style: light_rail
|
||||
regional:
|
||||
osm:
|
||||
route: train
|
||||
gtfs_route_type: 2
|
||||
style: regional
|
||||
bus:
|
||||
osm:
|
||||
route: bus
|
||||
network: Movia
|
||||
gtfs_route_type: 3
|
||||
style: bus
|
||||
Reference in New Issue
Block a user