Bend bike routes + classified network overlay (Casual mode)#93
Merged
Conversation
Two OSM-derived additions to Bend's Casual mode, inspired by bendbikes.org (data © OpenStreetMap; credited on the About page): - Classified bike-network overlay: scripts/build_bend_bike_network.py grades ~6.2k OSM ways in a Bend bbox into five comfort tiers (paved/unpaved trail, bike lane, calm street, use caution) -> public/data/bend/bike-network.geojson. ensureBendNetworkSource renders two stacked line layers, toggled from the Casual sidebar (BikeNetworkLayer + 5-class legend), city-gated by bikeNetworkUrl. - Greenway routes: scripts/build_bend_routes.py stitches 8 named multi-use paths (Deschutes River Trail, Discovery, Rimrock, Haul Road, ...) -> routes.geojson + bend/bike-routes.data.ts. ensureInlineRoutes attaches a per-route line/casing/hit layer from GeoJSON keyed by id, so the existing route select/zoom/click flow works unchanged. City-gated by bikeRoutesUrl. plan.md captures the multi-city roadmap.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9c3904952
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Lazy-attach the multi-MB network GeoJSON on first toggle instead of at startup, so users who never open the overlay don't download it (#1). - Classify untagged path/footway/bridleway as unpaved (only explicitly-paved surfaces are 'paved trail'); cycleways still default paved (#2). - Share a firstSymbolLayerId() helper for label-aware layer insertion (#3). - Consolidate slugify into scripts/_geo.py; build_bend_routes reuses line_length_m from osm_trail_elevation (#4, #8). - Reuse buildColorExpression for the network color; collapse the network and inline-route layer creation into spec-driven loops (#5, #7). - De-Bend the generic mechanism: bend-network.ts -> bike-network.ts, BEND_NETWORK_* -> BIKE_NETWORK_*, ensureBendNetworkSource -> ensureBikeNetworkSource, event bendNetwork -> bikeNetwork, source ids -> bike-network-source / inline-routes-source; build script takes --region/--out for reuse (#6). - Key the Overpass cache by query hash so a different --bbox doesn't reuse a stale extent (P3). - Export reads inline-route geometry from the GeoJSON when bikeRoutesUrl is set, so Bend's /export finds features and enables GPX/SVG (P2).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Bend's Casual-mode cycling content — both rebuilt from OpenStreetMap and inspired by bendbikes.org (data © OpenStreetMap; credited on the About page). Complements the curated MTB pane that landed in #91.
What's in it
1. Classified bike-network overlay
A toggleable overlay that color-codes Bend's streets/paths by comfort, like a low-stress-network map.
scripts/build_bend_bike_network.py— one Overpass query for a Bend bbox, grades ~6.2k OSM ways into five tiers via OSM tags (LTS-lite): paved trail / unpaved trail / bike lane / calm street / use caution →public/data/bend/bike-network.geojson(489 KB gzipped).ensureBendNetworkSource/setBendNetworkVisiblerender two stacked line layers (base tint + infra on top), beneath labels.BikeNetworkLayer(toggle + color legend); city-gated bybikeNetworkUrl(hidden for Chattanooga).2. Greenway routes
Eight named multi-use paths surfaced in the routes sidebar (Chattanooga-parity), distinct from the MTB singletrack.
scripts/build_bend_routes.py— collects each route's segments by OSM name →public/data/bend/routes.geojson+bend/bike-routes.data.ts(Deschutes River Trail 13.2 mi, Discovery, Rimrock, Haul Road, Larkspur, Cascade Highlands, Tumalo Creek, West Bend).ensureInlineRoutesattaches a per-route line/casing/hit layer from GeoJSON keyed byid, so the existing route select/zoom/click/highlight flow works unchanged. City-gated bybikeRoutesUrl(Chattanooga keeps its Studio-layer routes).Architecture notes
CityDatafields (bikeNetworkUrl,bikeRoutesUrl) — no impact on Chattanooga.Verification
pnpm typecheck,pnpm lintclean; 367 tests pass.plan.mdcaptures the multi-city roadmap (Phase 3 = prove "any city" from OSM).🤖 Generated with Claude Code