Skip to content

Can't write empty assets to stac-geoparquet #766

@gadomski

Description

@gadomski

Currently, we can't write a stac-geoparquet with an empty assets structure:

GeoArrow(External(ArrowError("Parquet does not support writing empty structs")))

Simple code to trigger the error (from the stac crate):

let mut item: Item = crate::read("examples/simple-item.json").unwrap();
item.assets = Default::default();
let writer = Cursor::new(Vec::new());
super::into_writer(writer, vec![item]).unwrap();

We can probably bump the assets out of the schema and the JSON values when building the record batches if we detect it's empty.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions