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

geohash length is not as expected #3

Open
Jinyoyyo opened this issue Jan 13, 2016 · 0 comments
Open

geohash length is not as expected #3

Jinyoyyo opened this issue Jan 13, 2016 · 0 comments

Comments

@Jinyoyyo
Copy link

It seemed like encode method only can get correct length geohash when length is even.

In [14]: geohash.encode((1,1),1)
Out[14]: ''

In [15]: geohash.encode((1,1),2)
Out[15]: 's0'

In [16]: geohash.encode((1,1),3)
Out[16]: 's0'

In [17]: geohash.encode((1,1),4)
Out[17]: 's00t'

I guess the question is due to :


  length /= 2
  lon = _float_to_bits(lonlat[0], lower=-180.0, upper=180.0, length=length*5)
  lat = _float_to_bits(lonlat[1], lower=-90.0, upper=90.0, length=length*5)
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

1 participant