-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement conversions to GEOS objects #108
Conversation
@chrispahm this may interest you! It won't work in webassembly but opens the door to more interactions between the geoarrow format and GEOS |
That sounds great! Is the idea then to use GeoRust methods if available, and otherwise fall back to GEOS? Edit: is it because you're binding to the native GEOS library to construct the geometries? https://github.com/kylebarron/geoarrow-rs/pull/108/files#diff-d3825c859e07f524352858e0fd96957469e36e056eecd1408a6e9d0b186a8664R36 |
The idea is to let users choose whether to use native georust or GEOS for operations. The GEOS support is behind an optional feature flag so that environments that don't want to/can't include GEOS can work with all the non-GEOS functionality.
WebAssembly is a pretty minimal environment, and doesn't include e.g. libc by default. So in the C/C++ world, that's where emscripten comes in, to bridge between C programs and wasm. But Rust doesn't have the baggage of C and can compile to webassembly without needing emscripten. So in Rust there are two different targets for Wasm: Most of the Rust-wasm world is built on the former, and so the tooling for using rust + emscripten is very underdeveloped. More info in rustwasm/team#291. So it'll be possible to build to the |
Notes to self:
|
I didn't get the reverse conversion finished but going to merge so that I can prototype/test functions using GEOS that don't return geometries, e.g. area |
Thanks for the explanation @kylebarron! So essentially, if it would be possible to build to |
Correct, if we figured out the build tooling for |
TODO: