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

Make geohash coordinates lay inside polygons #12

Open
CEKrause opened this issue May 10, 2021 · 6 comments
Open

Make geohash coordinates lay inside polygons #12

CEKrause opened this issue May 10, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@CEKrause
Copy link
Collaborator

At the moment, geohashes are applied to the centroids of polygons. If a polygon is 'U'-shaped, then the centroid for the polygon will occur outside of the polygon itself, and the geohash will not make it clear which polygon it refers to.

Change the way the geohash is applied and apply it to the centroid of the polygon AND inside the polygon.

@CEKrause CEKrause added the enhancement New feature or request label May 10, 2021
@MatthewJA
Copy link
Contributor

What kind of method were you thinking for this? Project centroid to the nearest boundary vertex?

@CEKrause
Copy link
Collaborator Author

@vnewey had some ideas for how we could implement this. I am not sure how easy it would be to do since we are using the geohash python library to attribute geohashes. It would be worth seeing if the library has a switch that already does this? Otherwise we may want to look into doing a PR into their repo to implement?

@CEKrause
Copy link
Collaborator Author

This is the repo for the function we use https://github.com/hkwi/python-geohash

@CEKrause
Copy link
Collaborator Author

hmmm. This repo looks unmaintained. Maybe we should explore if there's a better option?

@MatthewJA
Copy link
Contributor

Agreed! Maybe geohash2? I think this one is available on Sandbox, too.

@MatthewJA
Copy link
Contributor

Though I don't think there's anything wrong with either module... all geohash modules seem to not have been updated recently

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

No branches or pull requests

2 participants