Home | Trees | Indices | Help |
|
---|
|
object --+ | basestring --+ | str --+ | Geohash
Geohash class, sub-class of str.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Static Methods | |||
a new object with type S, a subtype of T |
|
Properties | |
latlon Get the lat-/longitude of (the approximate center of) this geohash as 2-Tuple (lat, lon) in degrees. |
|
neighbors Get all 8 adjacent cells as a dict(N=, NE=, E= ..., SW=) of Geohashes. |
|
sizes Get the lat- and longitudinal size of this cell as a 2-tuple (latHeight, lonWidth) in meter. |
|
N Get the cell North of this (Geohash). |
|
S Get the cell South of this (Geohash). |
|
E Get the cell East of this (Geohash). |
|
W Get the cell West of this (Geohash). |
|
NE Get the cell NorthEast of this (Geohash). |
|
NW Get the cell NorthWest of this (Geohash). |
|
SE Get the cell SouthEast of this (Geohash). |
|
SW Get the cell SouthWest of this (Geohash). |
|
Inherited from |
Method Details |
New Geohash. |
repr(x)
|
Determine the adjacent cell in given compass direction.
|
Return the SW/NE lat-/longitude bounds of this geohash cell.
|
Estimate the distance between this and an other geohash (from the cell sizes). |
Approximate the distance between this and an other geohash (with Pythagoras' theorem). |
Compute the great-circle distance between this and an other geohash (using the Haversine formula). |
Return (the approximate center of) this geohash cell as an instance of the supplied LatLon class.
Example: >>> from sphericalTrigonometry import LatLon >>> ll = Geohash('u120fxw').toLatLon(LatLon) >>> print(repr(ll)) # LatLon(52°12′17.9″N, 000°07′07.64″E) >>> print(ll) # 52.204971°N, 000.11879°E |
Property Details |
latlonGet the lat-/longitude of (the approximate center of) this geohash as 2-Tuple (lat, lon) in degrees. Example: >>> geohash.Geohash('geek').latlon # 65.478515625, -17.75390625 >>> geohash.decode('geek') # '65.48', '-17.75'
|
neighborsGet all 8 adjacent cells as a dict(N=, NE=, E= ..., SW=) of Geohashes. JSname: neighbours.
|
sizesGet the lat- and longitudinal size of this cell as a 2-tuple (latHeight, lonWidth) in meter.
|
NEGet the cell NorthEast of this (Geohash).
|
NWGet the cell NorthWest of this (Geohash).
|
SEGet the cell SouthEast of this (Geohash).
|
SWGet the cell SouthWest of this (Geohash).
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Jun 20 12:31:43 2017 | http://epydoc.sourceforge.net |