georust / geozero

Zero-Copy reading and writing of geospatial data.
Apache License 2.0
352 stars 37 forks source link

Sketch of reading from GeoArrow struct encoding #71

Closed kylebarron closed 9 months ago

kylebarron commented 1 year ago

This is a sketch (only point and multipoint are implemented for now) of reading from the proposed struct encoding in the geoarrow spec.

GeoArrow is undecided as of now whether the point object should be represented by a logical "struct" (physically, the x and y arrays are distinct in memory) or a logical "fixed size list" (physically, x and y coordinates are interleaved). This PR implements the struct approach; it's not hard to switch between the two, so we could implement both for now and then remove one if/when the geoarrow spec chooses one for the standard.

Notes:

Related to https://github.com/georust/geozero/issues/37

pka commented 1 year ago

Code looks fine for me so far!

geozero has very limited support for empty (null) geometries. See this discussion for more details: https://github.com/georust/geozero/pull/20#discussion_r840003700

kylebarron commented 1 year ago

For now I switched to prototyping a geoarrow implementation as a crate in geopolars so that I could iterate faster, and in the future I think it would make sense to come back and figure out how to integrate with geozero.

I suppose I could also just implement GeomProcessor in the geoarrow crate and keep it as a separate implementation, like the flatgeobuf crate is.

kylebarron commented 9 months ago

Closing this because this was implemented in https://github.com/geoarrow/geoarrow-rs, with bindings from that into geozero