Skip to main content

require_osm_header

Function require_osm_header 

Source
pub fn require_osm_header(pbf_path: &Path) -> Result<(), GeolithError>
Expand description

The first blob of an OSM PBF is its header. A file with no blob at all (an empty download) reads as a PBF with no elements, so the build would go on with an empty planet: refuse it, naming the file.

§Errors

GeolithError::OsmPbf when the file has no OSM header blob, the reader’s error when the first blob cannot be read.