Package pygeodesy :: Module gars :: Class Garef |
[frames] | no frames]

# Class Garef

    object --+
             |
    basestring --+
                 |
               str --+
                     |
        object --+   |
                 |   |
      named._Named --+
                     |
       named._NamedStr --+
                         |
                        Garef

Garef class, a `_NamedStr`.

Instance Methods
toLatLon(self, LatLon, **kwds) Return (the center of) this garef cell as an instance of the supplied `LatLon` class. |
Inherited from `named._NamedStr`: `__repr__`, `__str__` Inherited from `str`: `__add__`, `__contains__`, `__eq__`, `__format__`, `__ge__`, `__getattribute__`, `__getitem__`, `__getnewargs__`, `__getslice__`, `__gt__`, `__hash__`, `__le__`, `__len__`, `__lt__`, `__mod__`, `__mul__`, `__ne__`, `__rmod__`, `__rmul__`, `__sizeof__`, `capitalize`, `center`, `count`, `decode`, `encode`, `endswith`, `expandtabs`, `find`, `format`, `index`, `isalnum`, `isalpha`, `isdigit`, `islower`, `isspace`, `istitle`, `isupper`, `join`, `ljust`, `lower`, `lstrip`, `partition`, `replace`, `rfind`, `rindex`, `rjust`, `rpartition`, `rsplit`, `rstrip`, `split`, `splitlines`, `startswith`, `strip`, `swapcase`, `title`, `translate`, `upper`, `zfill` Inherited from `named._Named`: `__copy__`, `classof`, `copy` Inherited from `object`: `__delattr__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__subclasshook__`

Static Methods
a new object with type S, a subtype of T |
__new__(cls, cll, precision=1, name=`'````'`) New Garef from an other Garef instance or garef `str` or from a `LatLon` instance or lat-/longitude `str`. |

Properties
| latlon Get this garef's (center) lat- and longitude (LatLon2Tuple).
| precision Get this garef's precision (`int`).
Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2` Inherited from `object`: `__class__`

Method Details

### __new__(cls, cll, precision=1, name=`'````'`) Static Method |
New Garef from an other Garef instance or garef `str` or from a `LatLon` instance or lat-/longitude `str`. Parameters: `cll` - Cell or location (Garef or `str`, `LatLon` or `str`). `precision` - Optional, the desired garef resolution and length (`int` 0..2), see function gars.encode for more details. `name` - Optional name (`str`). Returns: a new object with type S, a subtype of T New Garef. Raises: `RangeError` - Invalid `cll` lat- or longitude. `TypeError` - Invalid `cll`. `ValueError` - INValid or non-alphanumeric `cll`. Overrides: object.__new__

### toLatLon(self, LatLon, **kwds) |
Return (the center of) this garef cell as an instance of the supplied `LatLon` class. Parameters: `LatLon` - Class to use (`LatLon`). `kwds` - Optional keyword arguments for `LatLon`. Returns: This garef location (`LatLon`). Raises: `ValueError` - Invalid `LatLon`.

Property Details

### latlon Get this garef's (center) lat- and longitude (LatLon2Tuple). Get Method: latlon(self) - Get this garef's (center) lat- and longitude (LatLon2Tuple). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### precision Get this garef's precision (`int`). Get Method: precision(self) - Get this garef's precision (`int`). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.