Skip to content

highways pack: carry OSM tunnel/bridge/ref so tunnels stop crossing ridges (2026q3r1 rebuild) #60

Description

@billmallard

Problem

The highways pack (highways-conus, built by pyEfis/tools/build_highway_db.py from the Geofabrik gis_osm_roads_free_1 layer) keeps only fclass + bbox + vertices. The source carries tunnel, bridge, ref, oneway and layer, all dropped at build. Consequences in the SVS: a tunnel draws as a road across the ridge it goes under (Colorado extract: 19 motorway + 6 trunk + 10 link tunnel segments, Eisenhower-Johnson on I-70 among them; California: 70 motorway tunnel segments), and with the planned terrain-following ribbons a bridge would sag into the valley it spans (4.4k bridge segments in CO, 18k in CA).

Proposal

  1. build_highway_db.py writes two new columns: flags INTEGER (bit 0 tunnel, bit 1 bridge, from the shapefile tunnel / bridge fields equal to T) and ref TEXT (e.g. I 35E, US 75, for route shields on the map later). Schema version bump in HighwayDB.SCHEMA_VERSION.
  2. HighwayDB (pyEfis) reads them when present (PRAGMA table_info) and returns flags = 0, ref = None on old packs; nothing becomes required by the manifest.
  3. SVS consumers: drop tunnel segments (the road ends at each portal); bridges skip terrain subdivision (straight and level between abutments).
  4. Rebuild highways-conus with the flags via work/build_na_roads.py (workstation job; the Geofabrik download is the expensive part, the build is minutes), publish as 2026q3r1, docs/roads.md updated, bench pyefis-data update. Class set stays motorway/trunk (+links) unless Bill decides to widen it.

Definition of done

  • builder tests for the columns and the old-pack fallback (pyEfis tests/tools/test_build_highway_db.py)
  • HighwayDB on the current pack returns flags = 0
  • SVS test: a tunnel polyline yields no vertices
  • pack 2026q3r1 built, signed, published; pack_meta attribution (ODbL) unchanged
  • a Glenwood Canyon capture shows I-70 ending at the Hanging Lake tunnel portals

Refs #17 (builder guards, California). Data side of the pyEfis SVS road-ribbon issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions