def __init__(self, e, n, h=0, cs0=_CassiniSoldner0, name=''): '''New L{Css} Cassini-Soldner position. @param e: Easting (C{meter}). @param n: Northing (C{meter}). @keyword h: Optional height (C{meter}). @keyword cs0: Optional, the Cassini-Soldner projection (L{CassiniSoldner}). @keyword name: Optional name (C{str}). @return: The Cassini-Soldner location (L{Css}). @raise CSSError: If B{C{e}} or B{C{n}} is invalid. @raise ImportError: Package U{GeographicLib<https://PyPI.org/ project/geographiclib>} missing. @raise TypeError: If B{C{cs0}} is not L{CassiniSoldner}. @example: >>> cs = Css(448251, 5411932.0001) ''' self._cs0 = _CassiniSoldner(cs0) self._easting = false2f(e, 'easting', false=False, Error=CSSError) self._northing = false2f(n, 'northing', false=False, Error=CSSError) if h: self._height = float(h) if name: self.name = name
def __init__(self, e, n, h=0, conic=Conics.WRF_Lb, name=''): '''New L{Lcc} Lamber conformal conic position. @param e: Easting (C{meter}). @param n: Northing (C{meter}). @keyword h: Optional height (C{meter}). @keyword conic: Optional, the conic projection (L{Conic}). @keyword name: Optional name (C{str}). @return: The Lambert location (L{Lcc}). @raise TypeError: If B{C{conic}} is not L{Conic}. @raise LCCError: Invalid or negative B{C{e}} or B{C{n}}. @example: >>> lb = Lcc(448251, 5411932.0001) ''' _TypeError(Conic, conic=conic) self._conic = conic self._easting = false2f(e, 'easting', false=conic.E0 > 0, Error=LCCError) self._northing = false2f(n, 'northing', false=conic.N0 > 0, Error=LCCError) if h: self._height = float(h) if name: self.name = name
def __init__(self, easting, northing, name=''): '''New L{Osgr} National Grid Reference. @param easting: Easting from OS false easting (C{meter}). @param northing: Northing from from OS false northing (C{meter}). @keyword name: Optional name (C{str}). @raise OSGRError: Invalid B{C{easting}} or B{C{northing}}. @example: >>> from pygeodesy import Osgr >>> r = Osgr(651409, 313177) ''' if name: self.name = name self._easting = false2f(easting, 'easting', Error=OSGRError) self._northing = false2f(northing, 'northing', Error=OSGRError)