Skip to main content

preprocess_relations

Function preprocess_relations 

Source
pub fn preprocess_relations(
    pbf_path: &Path,
) -> Result<HashMap<i64, Vec<CollectedRelation>>, GeolithError>
Expand description

Preprocess OSM relations to build a way→relation lookup table.

Scans the PBF file using parallel decompression (par_map_reduce) to find boundary and route relations. Returns a map from way ID to the relations that reference it.

§Errors

Returns an error if the PBF file can’t be read.