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 Gets the lat-/longitude of (the approximate center of) this geohash as 2-Tuple (lat, lon) in degrees. |
|
neighbors Gets all 8 adjacent cells as a dict(N=, NE=, E= ..., SW=) of Geohashes. |
|
sizes Gets the lat- and longitudinal size of this cell as a 2-tuple (latHeight, lonWidth) in meter. |
|
N Gets the cell North of this (Geohash). |
|
S Gets the cell South of this (Geohash). |
|
E Gets the cell East of this (Geohash). |
|
W Gets the cell West of this (Geohash). |
|
NE Gets the cell NorthEast of this (Geohash). |
|
NW Gets the cell NorthWest of this (Geohash). |
|
SE Gets the cell SouthEast of this (Geohash). |
|
SW Gets the cell SouthWest of this (Geohash). |
|
Inherited from |
Method Details |
New Geohash. |
repr(x)
|
Determines adjacent cell in given compass direction.
|
Returns SW/NE lat-/longitude bounds of this geohash cell.
|
Estimates the distance between this and an other geohash (from the cell sizes). |
Approximates the distance between this and an other geohash (with Pythagoras' theorem). |
Computes the great-circle distance between this and an other geohash (using the Haversine formula). |
Returns (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 |
latlonGets 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'
|
neighborsGets all 8 adjacent cells as a dict(N=, NE=, E= ..., SW=) of Geohashes. JSname: neighbours.
|
sizesGets the lat- and longitudinal size of this cell as a 2-tuple (latHeight, lonWidth) in meter.
|
NGets the cell North of this (Geohash).
|
SGets the cell South of this (Geohash).
|
NEGets the cell NorthEast of this (Geohash).
|
NWGets the cell NorthWest of this (Geohash).
|
SEGets the cell SouthEast of this (Geohash).
|
SWGets the cell SouthWest of this (Geohash).
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue May 30 11:06:29 2017 | http://epydoc.sourceforge.net |