feat: basic GTFS pathways support #128
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
gtfs.zone/coloring-book!128
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "96-gtfs-pathways"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #96
Setting feature.id from a string property (like 'place-jfk') gets coerced to 0 by the vector-tile encoder MapLibre uses internally for GeoJSON sources. setFeatureState then stores state under the string id while the rendered feature has id 0, so the focused branch of the circle-radius case never fires for stations with non-numeric ids. The station stays at its small unfocused radius and surrounding child stops cluster on top of it, making it appear to disappear on click. Switch both stops and pathways sources to use promoteId, which tells MapLibre to use the named property as the feature id while preserving string values. Drop the now-redundant manual id injection. Also: icon-size is a layout property and cannot use feature-state data expressions ("feature-state data expressions are not supported with layout properties"). The previous case expression made the station-x layer fail validation entirely, so no station showed an X. Switch to a single static icon-size of 1.0; the surrounding white circle still grows on focus via its paint-side feature-state expression.Empty stop_lat/stop_lon slipped past the map's `!isNaN(...)` filter (isNaN('') is false), so coord-less stops landed at (0,0). Per spec, generic nodes and boarding areas may omit coords and inherit from parent_station; entrances/platforms with empty coords should also fall back gracefully. Introduce a shared resolver that returns either the stop's own coords or a deterministic position on a 30m circle around the nearest coord-having ancestor (orphan siblings grouped by resolved ancestor, sorted by stop_id for stable layout). Stops with no resolvable position are skipped with a warning. Map stops, the station-expanded pathway lines, and the validator now share this resolver, so dots and pathway endpoints land on the same fanned-out positions. Validator: relax the blanket "lat/lon required" rule. Error only when location_type 0/1/2 has no coord-having ancestor; warn when those types will render via an ancestor; warn on orphaned 3/4 stops. Range checks unchanged when a value is present.Two related data-integrity bugs: 1. `generateCSVFromRows` hand-rolled CSV via `headers.join(',')` and `String(value)` with no quoting, so any field containing a comma, double-quote, or newline shifted every column to its right on save. On reload, stops with commas in `stop_name`/`stop_desc`/`municipality`/ etc. came back with `location_type` holding values from other columns (URLs, latitudes, municipality names), breaking station rendering, pathway resolution, and stop-view labels. Switch to `Papa.unparse` (already imported) and take the field set from the union of all row keys so columns added after the original import survive the round-trip. Drop the now-unused `formatFieldForExport` helper. 2. `MapController.fitMapToData` filtered stops with `!isNaN(stop_lat)`, but `isNaN('')` is false, so empty-string coords slipped through and `LngLatBounds.extend(['', ''])` coerced them to [0, 0]. The bounds blew open to cover the equator on initial load. Replace with the shared `hasValidCoords` helper. Existing IDB blobs are already corrupted by (1); users must Reset and re-import to recover. Subsequent saves are clean.flyToStation's filter only rejected null/undefined, so empty-string stop_lat/stop_lon slipped through and Number('') coerced them to 0. A station with any coord-less child then dragged the fitBounds viewport down to the equator. Same bug class as868c902— switch to the shared hasValidCoords helper.