{"record":{"id":"5db4d8e7c070ed3f","repo":"a-b-street/abstreet","slug":"can-t-import-parcels-for-popdat-bin-without-the-scenarios","errorCode":null,"errorMessage":"Can't import_parcels for popdat.bin without the scenarios feature (GDAL dependency)","messagePattern":"Can't import_parcels for popdat\\.bin without the scenarios feature \\(GDAL dependency\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"importer/src/soundcast/popdat.rs","lineNumber":233,"sourceCode":"                id,\n                ExtraShape {\n                    points: vec![gps],\n                    attributes,\n                },\n            );\n        }\n    }\n    info!(\"{} parcels\", prettyprint_usize(result.len()));\n\n    (result, shapes)\n}\n\n#[cfg(not(feature = \"scenarios\"))]\nfn import_parcels(\n    _: &Map,\n    _: &mut Timer,\n) -> (HashMap<usize, Endpoint>, BTreeMap<usize, ExtraShape>) {\n    panic!(\"Can't import_parcels for popdat.bin without the scenarios feature (GDAL dependency)\");\n}\n\n// From https://github.com/psrc/soundcast/wiki/Outputs#trip-file-_triptsv, dpurp\nfn get_purpose(code: &str) -> TripPurpose {\n    match code {\n        \"0.0\" => TripPurpose::Home,\n        \"1.0\" => TripPurpose::Work,\n        \"2.0\" => TripPurpose::School,\n        \"3.0\" => TripPurpose::Escort,\n        \"4.0\" => TripPurpose::PersonalBusiness,\n        \"5.0\" => TripPurpose::Shopping,\n        \"6.0\" => TripPurpose::Meal,\n        \"7.0\" => TripPurpose::Social,\n        \"8.0\" => TripPurpose::Recreation,\n        \"9.0\" => TripPurpose::Medical,\n        \"10.0\" => TripPurpose::ParkAndRideTransfer,\n        _ => panic!(\"Unknown dpurp {}\", code),\n    }","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/a-b-street/abstreet/blob/0964f29315820c91b171b585eb51e300164e9197/importer/src/soundcast/popdat.rs#L215-L251","documentation":"When the importer is built WITHOUT the \"scenarios\" cargo feature, import_parcels is replaced by a stub that unconditionally panics. Importing parcels (which turns parcel data into endpoints for popdat.bin) requires GDAL, so the crate only supports it under the scenarios feature. Hitting this panic means you invoked the Soundcast import pipeline in a build that excluded the feature.","triggerScenarios":"Running the importer to produce popdat.bin (importing Soundcast parcels/trips) with a binary compiled without `--features scenarios`, so the #[cfg(not(feature = \"scenarios\"))] stub executes.","commonSituations":"Building with plain `cargo build` instead of `cargo build --release --features scenarios`; CI scripts missing the feature flag; following docs for scenario import with a default-feature build.","solutions":["Rebuild with the feature enabled: `cargo build --release --features scenarios` (requires GDAL system libraries installed).","Install GDAL dev packages first (e.g. `apt install libgdal-dev`) so the feature compiles.","If parcels aren't needed, use an import path/mode that skips popdat generation.","Regenerate popdat.bin on a machine with the scenarios build and copy the artifact over."],"exampleFix":"// before\ncargo build --release\n./target/release/importer soundcast\n// after\ncargo build --release --features scenarios\n./target/release/importer soundcast","handlingStrategy":"validation","validationCode":"// At build/startup time, check the feature was compiled in:\n#[cfg(not(feature = \"scenarios\"))]\ncompile_error!(\"scenario import requires --features scenarios\");","typeGuard":null,"tryCatchPattern":"// Panics uncatchably; verify build flags before running imports:\nif std::env::var(\"POPDAT_IMPORT\").is_ok() && !cfg!(feature = \"scenarios\") {\n    eprintln!(\"rebuild with --features scenarios\");\n    return;\n}","preventionTips":["Always build the importer with `cargo build --release --features scenarios` for Soundcast work.","Install libgdal-dev before enabling the feature so builds succeed.","Encode the feature flag in CI scripts and Makefiles, not ad-hoc commands."],"tags":["panic","cargo-feature","gdal","build-config"],"backgroundTag":"feature-not-enabled","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"}