stac-rs icon indicating copy to clipboard operation
stac-rs copied to clipboard

Can't write empty assets to stac-geoparquet

Open gadomski opened this issue 6 months ago • 0 comments

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.

gadomski avatar May 30 '25 14:05 gadomski