maps: draw transit lines and stops one zoom level farther out
- Commit
4d64a79bb844bb78eab8d051ee622d003887466c- Author
- vayun-mathur <[email protected]>
- When
- 2026-08-21 15:49 UTC (3 months ago)
- Parents
d283ccc
Diff
maps/src/main/java/com/vayunmathur/maps/ui/TransitStopsLayer.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/TransitStopsLayer.kt b/maps/src/main/java/com/vayunmathur/maps/ui/TransitStopsLayer.ktindex e3b41be526..95a0873dfa 100644--- a/maps/src/main/java/com/vayunmathur/maps/ui/TransitStopsLayer.kt+++ b/maps/src/main/java/com/vayunmathur/maps/ui/TransitStopsLayer.kt@@ -55,7 +55,7 @@ private val TRANSIT_FERRY_COLOR = Color(0xFF0277BD) /** * Draw the `transit_stops` source-layer: a [CircleLayer] dot with a [SymbolLayer]- * glyph on top, from z11 up. Takes the SAME shared [VectorSource] the admin and+ * glyph on top, from z10 up. Takes the SAME shared [VectorSource] the admin and * POI overlays use — a second source on the same PMTiles triggers a directory * parse error (see the note at [MaPoisLayer]). *@@ -85,10 +85,13 @@ fun TransitStopsLayer(source: VectorSource) { TRANSIT_STOP_DOT_LAYER_ID, source, sourceLayer = TransitStopsSource.SOURCE_LAYER,- minZoom = 11f,+ minZoom = 10f, color = dotColor, radius = interpolate( linear(), zoom(),+ // z10 is the archive floor; without a stop here the ramp clamps to its+ // z12 value and the dots read far too heavy two zooms out.+ 10 to const(2.5.dp), 12 to const(4.dp), 15 to const(6.dp), 18 to const(8.dp),@@ -101,10 +104,11 @@ fun TransitStopsLayer(source: VectorSource) { TRANSIT_STOP_LAYER_ID, source, sourceLayer = TransitStopsSource.SOURCE_LAYER,- minZoom = 11f,+ minZoom = 10f, iconImage = image(marker), iconSize = interpolate( linear(), zoom(),+ 10 to const(0.22f), 12 to const(0.35f), 15 to const(0.5f), 18 to const(0.65f),
scripts/maps/build_all.ps1
diff --git a/scripts/maps/build_all.ps1 b/scripts/maps/build_all.ps1index a305fc9db8..0bfda692d6 100644--- a/scripts/maps/build_all.ps1+++ b/scripts/maps/build_all.ps1@@ -297,7 +297,7 @@ For a complete v5 with every layer, run build_all.sh under WSL. foreach ($spec in @( @{ Layer = "safety"; Tile = $SafetyTile; Bin = "tile_points"; Min = 10; Max = 16; Extra = @() }, @{ Layer = "maxspeed"; Tile = $MaxspeedTile; Bin = "tile_lines"; Min = 12; Max = 16; Extra = @() },- @{ Layer = "transit_lines"; Tile = $TransitLinesTile; Bin = "tile_lines"; Min = 9; Max = 16; Extra = @() },+ @{ Layer = "transit_lines"; Tile = $TransitLinesTile; Bin = "tile_lines"; Min = 8; Max = 16; Extra = @() }, # Admin polygons must stay whole enough to reassemble for the # dimming mask, so the per-tile byte budget is effectively lifted -- # the same reason the legacy path passed --no-tile-size-limit.@@ -328,7 +328,7 @@ For a complete v5 with every layer, run build_all.sh under WSL. Invoke-Step "cargo" @("run", "--release", "--quiet", "--manifest-path", $TileManifest, "--bin", "tile_points", "--", "--geojson", $stopsGeo, "--out", $StopsTile, "--layer", "transit_stops",- "--minzoom", "11", "--maxzoom", "14")+ "--minzoom", "10", "--maxzoom", "14") } else { Write-Warning "no GTFS manifest available; skipping the transit_stops layer" }
scripts/maps/build_transit_lines_layer.sh
diff --git a/scripts/maps/build_transit_lines_layer.sh b/scripts/maps/build_transit_lines_layer.shindex 922db9df36..150581cf30 100644--- a/scripts/maps/build_transit_lines_layer.sh+++ b/scripts/maps/build_transit_lines_layer.sh@@ -43,7 +43,7 @@ set -euo pipefail # --pbf FILE Input OSM .pbf (required) # --out FILE Output .pmtiles (default: transit_lines.pmtiles) # --bbox BOX Optional "minlon,minlat,maxlon,maxlat" metro extract (dry runs)-# --minzoom N tiler minzoom (default 9)+# --minzoom N tiler minzoom (default 8) # --maxzoom N tiler maxzoom (default 16) # --engine E rust|legacy (default rust) # --geojson-out F also keep the intermediate geojsonseq here (for the@@ -58,7 +58,7 @@ HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PBF="" OUT="transit_lines.pmtiles" BBOX=""-MINZOOM=9+MINZOOM=8 MAXZOOM=16 ENGINE="rust" GEOJSON_OUT=""
scripts/maps/build_transit_stops_layer.ps1
diff --git a/scripts/maps/build_transit_stops_layer.ps1 b/scripts/maps/build_transit_stops_layer.ps1index 02e19bbe76..6c81d1fe72 100644--- a/scripts/maps/build_transit_stops_layer.ps1+++ b/scripts/maps/build_transit_stops_layer.ps1@@ -19,7 +19,7 @@ # Usage: # .\build_transit_stops_layer.ps1 -Manifest ca_transit_work\feeds.manifest # .\build_transit_stops_layer.ps1 -Manifest m.txt -Out transit_stops.pmtiles `-# -MinZoom 11 -MaxZoom 14+# -MinZoom 10 -MaxZoom 14 # # Requires: cargo (https://rustup.rs). Nothing else. [CmdletBinding()]@@ -30,8 +30,8 @@ param( [string]$Out = "transit_stops.pmtiles", # Scratch dir for the intermediate geojsonseq. [string]$Work = "transit_stops_work",- # 11 because stops are denser than ma_pois (12) but far sparser than roads.- [int]$MinZoom = 11,+ # 10 because stops are denser than ma_pois (12) but far sparser than roads.+ [int]$MinZoom = 10, [int]$MaxZoom = 14, # Keep the intermediate geojsonseq for inspection. [switch]$KeepWork
scripts/maps/build_transit_stops_layer.sh
diff --git a/scripts/maps/build_transit_stops_layer.sh b/scripts/maps/build_transit_stops_layer.shindex 21094acf44..0e6fac431c 100644--- a/scripts/maps/build_transit_stops_layer.sh+++ b/scripts/maps/build_transit_stops_layer.sh@@ -22,13 +22,13 @@ set -euo pipefail # Usage: # ./build_transit_stops_layer.sh --manifest world_transit_work/feeds.manifest # ./build_transit_stops_layer.sh --manifest m.txt --out transit_stops.pmtiles \-# --minzoom 11 --maxzoom 14+# --minzoom 10 --maxzoom 14 # # Options: # --manifest FILE feeds.manifest: `name=dir[=motis_prefix]` per line (required) # --out FILE output .pmtiles (default transit_stops.pmtiles) # --workdir DIR scratch dir for the geojsonseq (default ./transit_stops_work)-# --minzoom N default 11 (stops are denser than ma_pois, sparser than roads)+# --minzoom N default 10 (stops are denser than ma_pois, sparser than roads) # --maxzoom N default 14 # --keep-work keep the intermediate geojsonseq #@@ -37,7 +37,7 @@ HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" MANIFEST="" OUT="transit_stops.pmtiles" WORK="./transit_stops_work"-MINZOOM=11+MINZOOM=10 MAXZOOM=14 KEEP_WORK=0 while [[ $# -gt 0 ]]; do