geoarrow-rs
geoarrow-rs copied to clipboard
Allow coordinate builders to take in coordinates of a different dimension?
We currently error if the dimension of a pushed geometry differs from the dimension of the builder: https://github.com/geoarrow/geoarrow-rs/blob/0866b8034350222b23abb419b23c1dc7a614e5a2/rust/geoarrow-array/src/builder/coord/separated.rs#L111-L151
Seems like it would be fine to allow passing an XYZ point to an XY builder, where the Z dimension silently gets dropped. Should we allow the other way too? Should we allow setting a default value like Builder::with_default_z_value?
I suppose we could make this user-configurable. Have an option like PointBuilder::with_coordinate_policy or something like that, to allow customizing the behavior for alternate-dimension data.
enum CoordBuilderPolicy {
FillValue(f64),
Error
}