Skip to content

feat(expr-geo): add buffer kernel (geo::Buffer)#1463

Merged
kylebarron merged 1 commit into
geoarrow:mainfrom
willcohen:buffer
Jul 15, 2026
Merged

feat(expr-geo): add buffer kernel (geo::Buffer)#1463
kylebarron merged 1 commit into
geoarrow:mainfrom
willcohen:buffer

Conversation

@willcohen

Copy link
Copy Markdown
Contributor

A first step toward adding operations to geoarrow-expr-geo that exist elsewhere in geoarrow-rs (and in geo) but aren't yet exposed here. Buffer strikes me as a high-value one to start with!

buffer(array, distance, coord_type) -> MultiPolygonArray. Public wrapper
over a private _buffer_impl dispatched via downcast_geoarrow_array! (area.rs
style). Marshals each row through geometry_to_geo, calls geo::Buffer::buffer,
builds the result with MultiPolygonBuilder. Null in -> null out; row count
preserved. Output is 2D; Z/M dropped since buffer vertices are new points.

Tests: unit square +0.5 has area > 1.0; null passthrough; WKB-parse path.
@github-actions github-actions Bot added the feat label Jul 13, 2026

@kylebarron kylebarron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread rust/geoarrow-expr-geo/src/buffer.rs
@kylebarron
kylebarron merged commit 44676d0 into geoarrow:main Jul 15, 2026
13 checks passed
@willcohen

Copy link
Copy Markdown
Contributor Author

Thank you! Would it be preferable to do each additional operation as its own PR, or in batches of a few at a time? I’m trying to add in the other ones I see with the existing bindings so WASM and Java can both work off this common impl. (I’m leaving the triangulation and earcut etc for a later phase since those use other crates, just the operations that only need pure geo)

@willcohen
willcohen deleted the buffer branch July 15, 2026 12:11
@kylebarron

Copy link
Copy Markdown
Member

You can add operations in batches; that's fine! Especially since geoarrow-rs isn't highest priority right now so my reviews might wait a few days (and I'm on vacation until Tuesday)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants