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

Implement conversion to geometry arrays on `AsRef<[G]>` where `G: GeometryTrait`

Open kylebarron opened this issue 1 year ago • 2 comments

Ideally, this should allow converting either from a Vec<G> or &[G]. I got errors where it wanted [G] to be a trait object

kylebarron avatar Nov 21 '23 02:11 kylebarron

In https://github.com/geoarrow/geoarrow-rs/pull/288 it was changed to be implemented on a slice but not vec. it would still be nice to get this implemented on AsRef<[G]>, but I had issues getting that to work last time I tried.

kylebarron avatar Dec 01 '23 04:12 kylebarron

I hit issues recently where I couldn't implement this both on [G] and [Option<G>] because the upstream G implementation could in the future add an impl on Option<G>. Still not sure the best way to handle this. Perhaps, we just can't have them both as blanket implementations of From

kylebarron avatar Oct 29 '24 22:10 kylebarron