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

Implement h3.compact and uncompact #30

Open
KoalaGeo opened this issue Feb 1, 2024 · 2 comments
Open

Implement h3.compact and uncompact #30

KoalaGeo opened this issue Feb 1, 2024 · 2 comments

Comments

@KoalaGeo
Copy link

KoalaGeo commented Feb 1, 2024

Hi,

This library is great! Do you have plans to implement the H3 compact and uncompact functions?

Regards,

Edd

@DahnJ
Copy link
Owner

DahnJ commented Feb 2, 2024

Hi @KoalaGeo glad you like the library!

Currently, I have no such plans.

What behaviour would you expect these functions to have in H3-Pandas?

compact and uncompact are set operations and applying them to a dataframe with potential additional data is not straightforward. I see two general options

  1. The data would have to be removed and the returned dataframe would be index-only. This would not be difficult to implement. I can see how that's still potentially convenient, as it allows you to string further h3 operations.
  2. The compacted/uncompacted cells would have to be matched back with the rows they originated from with some (dis)aggregation operation being performed on the data. k_ring_smoothing does something similar.

It would be helpful if you could elaborate on your usecase to drive the potential API.

@KoalaGeo
Copy link
Author

KoalaGeo commented Feb 3, 2024

I'm working with polygons, primarily categorical data (geology, rock type, formation name, descriptions etc).

I'm using polyfill / polyfill_resample, however it's resulting in massive numbers of polygons to accurately represent the input geometries - resolution 13 or 14 required.

I could do with the compact function at the end to simplify the data to fewer features using an index attribute eg rock type.

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