james-willis commented on code in PR #749:
URL: https://github.com/apache/sedona-db/pull/749#discussion_r3113165263
##########
rust/sedona-schema/src/raster.rs:
##########
@@ -55,32 +54,37 @@ impl RasterSchema {
)))
}
- /// Individual band schema
+ /// Individual band schema — flattened N-D band with dimension metadata
pub fn band_type() -> DataType {
DataType::Struct(Fields::from(vec![
- Field::new(column::METADATA, Self::band_metadata_type(), false),
- Field::new(column::DATA, Self::band_data_type(), false),
+ Field::new(column::NAME, DataType::Utf8, true),
+ Field::new(column::DIM_NAMES, Self::dim_names_type(), false),
+ Field::new(column::SHAPE, Self::shape_type(), false),
+ Field::new(column::DATATYPE, DataType::UInt32, false),
+ Field::new(column::NODATA, DataType::Binary, true),
+ Field::new(column::STRIDES, Self::strides_type(), false),
+ Field::new(column::OFFSET, DataType::UInt64, false),
+ Field::new(column::OUTDB_URI, DataType::Utf8, true),
+ Field::new(column::DATA, DataType::BinaryView, false),
Review Comment:
> The main change is that bands have their own dimensions, with the addition
of dim_names. The spatial dimensions of all the bands have to match.
Yes
> Here outdb_uri typically refers to a portion of a raster (e.g., COG tile)
rather than a full array.
You're probably right. That's up to the reader implementation, e.g. the
geotiff reader can implement reading tiles, whole arrays, or both.
> In particular, because OUTDB_URI doesn't have to be modified, we can delay
loading tiles for longer.
I will think about this more before I respond. I need to think about how I
intend for striding and outdb to interact. I think I had considered striding
only an indb operation but that will add complexity to operations that dont
bring the raster in but would benefit from stride-on-read
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]