paleolimbot / s2geography

Simple features (ish) for s2geometry
Apache License 2.0
33 stars 4 forks source link

feat: Use geoarrow-c for input functionality #16

Closed paleolimbot closed 2 months ago

codecov-commenter commented 8 months ago

Codecov Report

Attention: 276 lines in your changes are missing coverage. Please review.

Comparison is base (73cbf9a) 32.71% compared to head (5f6adf8) 28.04%.

Files Patch % Lines
src/s2geography/geoarrow.cc 4.62% 268 Missing :warning:
src/s2geography/geoarrow.h 0.00% 8 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #16 +/- ## ========================================== - Coverage 32.71% 28.04% -4.67% ========================================== Files 14 16 +2 Lines 1458 1747 +289 Branches 28 35 +7 ========================================== + Hits 477 490 +13 - Misses 973 1249 +276 Partials 8 8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jorisvandenbossche commented 2 months ago

Small question: the title of the PR mentions "input/output", but is my reading correct that at the moment this PR only adds the "input" part? (there only seems to be a reader that goes from any sort of ArrowArray to a vector of Geography objects)

paleolimbot commented 2 months ago

I need to revisit this PR! I think the output part is actually much easier than the input part, and that the goal of this PR is to remove the shim I had added earlier that was a previous (and untested) version of a C++ geoarrow library. In order to remove that shim, I think it would have to handle both.

jorisvandenbossche commented 2 months ago

Small point of feedback, regarding the code structure: IMO it would be clearer if you put the geoarrow code in e.g. a vendored/ subdirectory (like we do in arrow/cpp), that will make it more obvious that this is vendored code not and not maintained here. And maybe also include a README in there that briefly mentions this and lists which functionality it provides that is used by s2geography.

paleolimbot commented 2 months ago

I think the output part is actually much easier than the input part

I still think this is true, but I'll merge this to hopefully unblock some of the things you are working on. For both input and output it may be worth avoiding geoarrow-c here, but at least this gets to a place where we can write tests and then improve the implementation. (All of this is code I wrote a long time ago!)