Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Jul 19, 2023
1 parent 45fbfdb commit f605845
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,36 @@
import geohashr

geohashr.encode(45.464664, 9.188540)
# 't18k68dr5kn8'
# 'u0nd9hdfue8h'

geohashr.decode('t18k68dr5kn8')
# (45.46466404572129, 9.188540065661073)
geohashr.decode('u0nd9hdfue8h')
# (45.46466396190226, 9.188540149480104)

geohashr.bbox('t18k68dr5kn8')
geohashr.decode_exact('u0nd9hd')
# (45.46485900878906, 9.188003540039062, 0.0006866455078125, 0.0006866455078125)

geohashr.bbox('u0nd9hdfue8h')
# {
# 'e': 45.464664213359356,
# 's': 9.188539981842041,
# 'w': 45.46466387808323,
# 'n': 9.188540149480104
# 'e': 9.188540317118168,
# 's': 45.46466387808323,
# 'w': 9.188539981842041,
# 'n': 45.46466404572129
# }

geohashr.neighbors('t18k68dr5kn8')
geohashr.neighbors('u0nd9hdfue8h')
# {
# 'e': 't18k68dr5knb',
# 'n': 't18k68dr5kn9',
# 'ne': 't18k68dr5knc',
# 'nw': 't18k68dr5kn3',
# 's': 't18k68dr57yx',
# 'se': 't18k68dr57yz',
# 'sw': 't18k68dr57yr',
# 'w': 't18k68dr5kn2'
# 'e': 'u0nd9hdfue8k',
# 'n': 'u0nd9hdfue8j',
# 'ne': 'u0nd9hdfue8m',
# 'nw': 'u0nd9hdfu7xv',
# 's': 'u0nd9hdfue85',
# 'se': 'u0nd9hdfue87',
# 'sw': 'u0nd9hdfu7xg',
# 'w': 'u0nd9hdfu7xu'
# }

geohashr.neighbor('t18k68dr5kn8', 'e')
# 't18k68dr5knb'
geohashr.neighbor('u0nd9hdfue8h', 'e')
# 'u0nd9hdfue8k'
```

## License
Expand Down
2 changes: 1 addition & 1 deletion geohashr/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "1.1.0"

0 comments on commit f605845

Please sign in to comment.