feat(expr-geo): add buffer kernel (geo::Buffer)#1463
Merged
Conversation
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.
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) |
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A first step toward adding operations to
geoarrow-expr-geothat exist elsewhere in geoarrow-rs (and ingeo) but aren't yet exposed here. Buffer strikes me as a high-value one to start with!