{"record":{"id":"3787354e35bc8ca1","repo":"a-b-street/abstreet","slug":"stop-position-wasn-t-close-to-a-sidewalk","errorCode":null,"errorMessage":"Stop position {} wasn't close to a sidewalk","messagePattern":"Stop position (.+?) wasn't close to a sidewalk","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"map_model/src/make/transit.rs","lineNumber":95,"sourceCode":"                    id,\n                    name: stop.name.clone(),\n                    gtfs_id: stop.gtfs_id.clone(),\n                    driving_pos,\n                    sidewalk_pos: *sidewalk_pos,\n                    is_train_stop: vehicle == PathConstraints::Train,\n                },\n            );\n            gtfs_to_stop_id.insert(stop.gtfs_id.clone(), id);\n            Ok(())\n        } else {\n            bail!(\n                \"Couldn't find a lane for {:?} next to sidewalk {}\",\n                vehicle,\n                sidewalk_lane\n            );\n        }\n    } else {\n        bail!(\"Stop position {} wasn't close to a sidewalk\", stop.position);\n    }\n}\n\nstruct BorderSnapper {\n    bus_incoming_borders: FindClosest<LaneID>,\n    bus_outgoing_borders: FindClosest<LaneID>,\n    train_incoming_borders: FindClosest<LaneID>,\n    train_outgoing_borders: FindClosest<LaneID>,\n}\n\nimpl BorderSnapper {\n    fn new(map: &Map) -> BorderSnapper {\n        let mut snapper = BorderSnapper {\n            bus_incoming_borders: FindClosest::new(),\n            bus_outgoing_borders: FindClosest::new(),\n            train_incoming_borders: FindClosest::new(),\n            train_outgoing_borders: FindClosest::new(),\n        };","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/a-b-street/abstreet/blob/0964f29315820c91b171b585eb51e300164e9197/map_model/src/make/transit.rs#L77-L113","documentation":"A GTFS stop's position must be within snapping distance of a sidewalk to place a transit stop. If FindClosest found no sidewalk near stop.position, create_stop bails because the stop cannot be anchored to the pedestrian network.","triggerScenarios":"finalize_transit -> create_stop where the GTFS stop's lat/lng, projected into the map, is farther from any sidewalk than the snap threshold — e.g. coordinates slightly off (wrong projection) or stops placed in parking lots/medians away from sidewalks.","commonSituations":"Importing GTFS feeds for a different city than the map; GTFS stop_to_map projection drift at map edges; stops defined mid-block far from sidewalk geometry.","solutions":["Verify the GTFS feed matches the map's area and projection; fix stop coordinates.","Increase the sidewalk snap distance threshold in create_stop for the feed.","Skip or manually relocate the offending stop in the GTFS data."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let snap = sidewalk_finder.closest_pt(stop.position, snap_threshold);\nif snap.is_none() { /* skip stop: not near any sidewalk */ }","typeGuard":null,"tryCatchPattern":"match create_stop(map, stop, vehicle) {\n    Err(e) if e.to_string().contains(\"wasn't close to a sidewalk\") => {\n        warn!(\"stop {} off the pedestrian network\", stop.gtfs_id); continue;\n    }\n    other => other?,\n}","preventionTips":["Confirm the GTFS feed's city/area matches the map","Check projection correctness for stop lat/lng before import","Pre-filter stops farther than the snap threshold from any sidewalk"],"tags":["transit","gtfs","snapping"],"backgroundTag":"resource-not-found","analyzedSha":"0964f29315820c91b171b585eb51e300164e9197","analyzedAt":"2026-09-13T18:02:03.421Z","contentChangedAt":"2026-09-13T18:02:03.421Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}