Skip to main content

read_parquet_file

Function read_parquet_file 

Source
pub fn read_parquet_file(
    path: &Path,
    overture_type: OvertureType,
    bbox: Option<&Bbox>,
    emit: impl FnMut(InputFeature),
) -> Result<u64, GeolithError>
Expand description

Read all features from a Parquet file, passing each to emit.

Row groups are filtered by bbox (if provided). Features are decoded one batch at a time and immediately emitted โ€” nothing is accumulated in memory. Of the names.common map only the languages of crate::names are kept, as names.common.<lang> properties.

ยงErrors

GeolithError::Io when the file cannot be opened, and GeolithError::Parquet or GeolithError::Arrow when a row group or a batch cannot be decoded.