Gryd.geodesy

# -*- encoding:utf-8 -*-
http://bruno.thoorens.free.fr/licences/gryd.html
# Copyright© 2015, THOORENS Bruno
# All rights reserved.

 
Classes
       
_ctypes.Structure(_ctypes._CData)
Geodesic

 
class Geodesic(_ctypes.Structure)
    ctypes structure for geodesic coordinates. Attributes :
 * longitude -> radians
 * latitude -> radians
 * altitude -> meters
 
>>> dublin = Gryd.Geodesic(-6.272877, 53.344606, 0.)
>>> dublin
Geodesic point lon=-006°16'22.357'' lat=+053°20'40.582'' alt=0.000
>>> Gryd.Geodesic(45.5, 5.5, 105)
Geodesic point lon=+045°30´0.00´´ lat=+005°30´0.00´´ alt=105.000
 
 
Method resolution order:
Geodesic
_ctypes.Structure
_ctypes._CData
builtins.object

Methods defined here:
Gars(self)
Get the associated GARS Area.
>>> dublin.Gars()
'348MY16'
Geohash(self, digit=10)
Convert coordinates to geohash.
>>> dublin.Geohash() # by default on 10 digit for metric precision
gc7x3r04z7
>>> dublin.Geohash(14) # why not on 14 digit for milimetric precision
gc7x3r04z77csw
Georef(self, digit=8)
Convert coordinates to georef.
>>> dublin.Georef()
'MKJJ43322037'
>>> dublin.Georef(digit=4)
'MKJJ433203'
Maidenhead(self, level=4)
Convert coordinates to Maidenhead.
>>> dublin.Maidenhead()
'IO63ui72gq'
>>> dublin.Maidenhead(level=6)
'IO63ui72gq19dh'
__init__(self, *args, **kwargs)
Angular value must be given in degree here (more human values).
__repr__(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
altitude
Structure/Union member
latitude
Structure/Union member
longitude
Structure/Union member

 
Functions
       
from_gars(gars, anchor='')
return Geodesic object from gars. Optional anchor value to define where to handle 5minx5min tile
from_geohash(geohash)
return Geodesic object from geohash
from_georef(georef)
return Geodesic object from georef
from_maidenhead(maidenhead)
return Geodesic object from maidenhead