Skip to content

Order of items in geohash.neighbors does not match documentation. #16

Open

Description

@GoogleCodeExporter
The documentation shows:

>>> geohash.neighbors('ezs42')
['ezefr', 'ezs43', 'ezefx', 'ezs48', 'ezs49', 'ezefp', 'ezs40', 'ezs41']

I get the following when I run the same line in OSX on python-geohash==0.8.4:

Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin

>>> geohash.neighbors('ezs42')
['ezefr', 'ezs43', 'ezs40', 'ezefp', 'ezs41', 'ezs48', 'ezefx', 'ezs49']

If the order is indeterminate a dict would be a better choice so that you could 
predictably get a specific neighboring geohash.

Original issue reported on code.google.com by hollowa...@gmail.com on 18 Jul 2012 at 10:44

Activity

  1. chauncygu commented on Dec 7, 2018

    @chauncygu

    module 'geohash' has no attribute 'neighbors',why is this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions