Skip to content
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

Expand C API and use it! #160

Closed
paleolimbot opened this issue Dec 31, 2021 · 1 comment
Closed

Expand C API and use it! #160

paleolimbot opened this issue Dec 31, 2021 · 1 comment

Comments

@paleolimbot
Copy link
Collaborator

I don't think this can be done in a single release, but in general, we have the code that handles the R stuff (external pointers, geographies, etc.), the code that implements GEOS-like stuff using S2 classes, and a few wrappers to simplify S2 C++ stuff in the same files. The long-term goal, I think, would be to separate these three categories of things so that (1) other people that aren't using R can re-use some of the code and (2) maybe we can separate the building of the actual S2 library from the building of the R wrappers. That should make it easier to iterate on S2 but (but more complicated to add features, since they'd have to be added to the C API first).

This can be done slowly over a few releases...as a start, I think we can expose the S2Cell, S2CellId, and S2CellUnion methods as C wrappers since that will be new or almost new functionality. The MutableS2ShapeIndex and S2Shape, could come next since those get used for most of the implementations. The overlay bits (e.g., S2Builder) are probably the hardest to parameterize...we might have to make some C structures to make it work.

@paleolimbot
Copy link
Collaborator Author

Closed in #165.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant