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

How to decompose s2 polygon as a set of s2 cells #94

Closed
talegari opened this issue Jan 11, 2021 · 2 comments
Closed

How to decompose s2 polygon as a set of s2 cells #94

talegari opened this issue Jan 11, 2021 · 2 comments

Comments

@talegari
Copy link

Hi,

Firstly, great job with the package!

I am looking to get a covering of a polygon using S2 cells. From here, its possible to get the covering using buffer s2_buffer_cells. The result is a "s2_geography", "s2_xptr" object. How do we get the s2 cells which make up this covering polygon? (There was an method in the older version to do this)

Would a generic "s2_geography" --> character vector of s2 cells help?

@paleolimbot
Copy link
Collaborator

We're hoping to add this soon! I got excited about it a few months ago and opened an issue but soon ran out of time to actually do it. On the C++ side this is easy, but on the R side it needs a new type of vector class to handle an s2 cell which takes a bit more work.

Out of curiosity, what is your use case? (Will help me get a sense as to what interface you were hoping for)

@talegari
Copy link
Author

Thanks for the quick response @paleolimbot
We are trying to store isochrones (essentially polygons) as set of small enough S2 cells which cover it. This is planned to be used in production usecases. Our stack is for spatial work is mostly sf based, while the prod(engg) use S2.

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

2 participants