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 do I generate 9 digit geohash ? #2

Open
vherasme opened this issue Nov 9, 2015 · 1 comment
Open

How do I generate 9 digit geohash ? #2

vherasme opened this issue Nov 9, 2015 · 1 comment
Labels

Comments

@vherasme
Copy link

vherasme commented Nov 9, 2015

I would like to know how to modify the code in order to generate 9 digit geohashes. When I set the length = 9, the encode method returns 8 digits. similarly if I set length = 11, encode returns 10.

On the other hand, when the length is set to 10 or 12, the digits returned are exactly 10 or 12 respectively.

Could you please explain why this happens ?

@zkeqing
Copy link

zkeqing commented Sep 19, 2018

because of in function encode,
length /=2 make it just generate even num digits

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

No branches or pull requests

3 participants