Inspiration
When a student walks or bikes to a suburban high school along a six-lane boulevard like Dulles Avenue or Highway 6 in Sugar Land, Texas, standard consumer navigation apps treat the trip as if a car is shrinking down onto the shoulder. They optimize strictly for shortest distance and ignore whether a sidewalk suddenly terminates into a drainage ditch, whether a six-lane arterial intersection lacks a marked crosswalk, or where vehicles have actually struck pedestrians and cyclists in the past.
Reviewing TxDOT Crash Records Information System (CRIS) data from 2020 through 2024 around the Dulles High School campus corridor in Sugar Land revealed 21 documented pedestrian crashes and 12 bicycle crashes within a two-kilometer radius. At the same time, families and neighborhood advocates who try to report missing crosswalks or sidewalk gaps to city traffic engineers or TxDOT district offices often struggle to get traction because their requests lack exact OpenStreetMap way IDs, segment lengths in meters, and verifiable risk metrics. CrossSafe was built to bridge that gap between raw municipal GIS data and actionable neighborhood advocacy.
What it does
CrossSafe is a browser-based pedestrian and bicycle corridor telemetry instrument and bilingual municipal letter generator for the Dulles High School corridor in Sugar Land, Texas.
When a user selects one of the pre-audited commuter routes (such as Lexington Boulevard at Riverbend Crossing for walking, or Corporate Drive and Dairy Ashford Road for cycling), CrossSafe evaluates every OpenStreetMap highway way and intersection node along the corridor. Instead of hiding uncertainty behind a black-box score, it separates confirmed hazards from unmapped data gaps:
- It flags high-speed road segments (
maxspeed >= 35 mphor major arterials) wheresidewalk=noneorsidewalktags are missing in OpenStreetMap, calculating exact segment lengths in meters. - It inspects every street crossing along the route to check whether a mapped crosswalk or signalized pedestrian phase exists within 30 meters, while explicitly filtering out minor residential driveways and service entrances so the risk score is not distorted by false positives.
- It computes a transparent risk density metric (risk points per kilometer, calibrated against a median reference route score of 50) alongside a data-completeness confidence rating.
- With one click on Letter for this route, CrossSafe compiles a print-ready, one-page civic engineering brief in either English or Spanish (
ES - Spanish draft). The brief lists every specific OpenStreetMap way ID, crossing coordinate, and sidewalk gap in descending order of risk so residents can hand a factual, verifiable audit sheet to city traffic engineers or school district safety staff.
How we built it
CrossSafe is engineered as a fast, zero-framework vanilla JavaScript and Leaflet cartographic application backed by a deterministic spatial scoring engine (js/scoring.js, js/corridor.js, and js/letter.js):
- Spatial & Corridor Engine: We parsed OpenStreetMap Overpass API geometry and tag snapshots (
data/dulles-osm.json) alongside five-year TxDOT CRIS pedestrian and cyclist crash summaries (21pedestrian crashes,12bicycle crashes,5.57walk R50/km,8.64bike R50/km). Each route node is scored in under10 msclient-side using Haversine distance projections and 30-meter crossing proximity buffers. - Explicit Uncertainty & Anti-Slop Civic Design: If OpenStreetMap lacks a
sidewalk=*tag on a collector road, CrossSafe labels itSidewalk not mapped (unknown)rather than pretending the sidewalk is either present or absent. - Bilingual Advocacy Output: Both the interactive route inspector and the one-page print stylesheet (
css/print.css) support instant switching between English and Spanish (i18n/en.jsonandi18n/es.json), ensuring non-English-speaking households in Fort Bend County can document and submit neighborhood road safety requests. - Verification Harness: The repository includes an 84-test automated Node.js unit and integration test suite (
npm test) verifying Haversine geometry, driveway exclusion rules, risk-per-kilometer normalization, and bilingual letter generation.
Challenges we ran into
Our biggest technical hurdle was preventing residential driveways and parking lot service alleys from inflating intersection risk scores. Raw OpenStreetMap route graphs treat every highway=service curb cut that crosses a sidewalk as an intersection node. On the Corporate Drive cycling route, naive node counting flagged 26 crossings when only 9 were actual street intersections. We solved this by writing a topology filter in js/corridor.js that classifies highway=service and service=driveway ways separately (17 driveway/service entrances crossed (not counted as crossings)), keeping the risk calculation anchored to genuine street crossings.
We also had to balance strict Content-Security-Policy hardening with our zero-bundle CommonJS/browser dual-module loader so the exact same js/scoring.js modules could run in Node.js unit tests and directly in the browser without a webpack build step.
Accomplishments that we're proud of
- Sub-10ms Deterministic Corridor Scoring: Scoring a 3.16 km route across 38 segment and crossing findings completes in
9.3 msin the browser with zero external API keys or backend servers required. - Honest Cartographic Epistemology: CrossSafe never fabricates infrastructure claims. It tells the user exactly what the mapped OpenStreetMap data shows, what it leaves unmapped, and which exact items should be verified on site before filing a municipal work order.
- 84 Passing Automated Tests: Every mathematical invariant, from risk-per-kilometer normalization to Spanish translation parity, is locked down by automated tests.
What we learned
Building CrossSafe taught us that civic safety tools are most persuasive when they show their math and admit where public map data is incomplete. City traffic engineers do not respond to vague complaints that a road "feels dangerous," but they do respond when a resident hands them a one-page table showing that a 710-meter stretch of Wright Road and a 317-meter stretch of Dulles Avenue have unmapped sidewalk coverage across a corridor with 33 recorded pedestrian and cyclist crashes.
What's next for CrossSafe
Next, we plan to expand the pre-cached OpenStreetMap and TxDOT CRIS corridor snapshots to cover additional Fort Bend County public school zones, add a field-verification checklist mode so walkers can export an .osm patch file for missing sidewalk tags, and include MUTCD rectangular rapid-flashing beacon (RRFB) warrant thresholds in the printed engineering letter.
Built With
- accessibility
- css3
- gis
- html5
- javascript
- leaflet.js
- node.js
- openstreetmap
Log in or sign up for Devpost to join the conversation.