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

geo hashing (e.g. s2, h3, R-trees) #371

Open
kyle-messier opened this issue Oct 2, 2024 · 2 comments
Open

geo hashing (e.g. s2, h3, R-trees) #371

kyle-messier opened this issue Oct 2, 2024 · 2 comments
Assignees

Comments

@kyle-messier
Copy link
Collaborator

kyle-messier commented Oct 2, 2024

@mitchellmanware

We were discussing how prediction locations could be done in grids with no need to merge for a massive dataframe. We could build this grouping into a standardized spatial gridding system such as s2.

Prediction

We can easily use s2 to assign or create a prediction grid based on the establish s2 cells. Then groups of pred locations can easily and quickly be assessed via the s2 hashes.

Estimation

We could also consider using s2 cells to group any covariate calculation if we plan on using spatial grids as part of a cross pattern in targets.

@mitchellmanware
Copy link
Collaborator

@kyle-messier
I'll have to do some more reading on s2, but as I understand it: once the final model is developed, the model is applied to each s2 prediction grid cell (ie. group of pre-defined prediction locations) individually. And using the s2 grid is a standard way to divide a large spatial region?

@kyle-messier
Copy link
Collaborator Author

@mitchellmanware Yes, it is a standard. Another option, and from the look of it, the R functions are a bit easier to use is the Uber H3 grids based on hexagon grids .

The general idea is that our prediction data is pre-tagged with an h3 [or s2] hash. When coordinates are requested to look up model results, the geo hash is looked up, then the geo hashes are used to retrieve. Basically it is all text matching as opposed to spatial operations, which are way faster.

@kyle-messier kyle-messier changed the title s2 hashing geo hashing (e.g. s2, h3, R-trees) Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants