Esempio n. 1
0
 def _update(self, updated, *attrs):  # PYCHOK args
     '''(INTERNAL) Zap cached attributes if updated.
     '''
     if updated:
         LatLonNvectorBase._update(self, updated,
                                   _Nv=self._Nv)  # special case
         LatLonEllipsoidalBase._update(self, updated, '_r3', *attrs)
Esempio n. 2
0
 def _update(self, updated, *attrs):
     '''(INTERNAL) Zap cached attributes if updated.
     '''
     if updated:
         if self._Nv:
             self._Nv._fromll = None
             self._Nv = None
         LatLonNvectorBase._update(self, updated, '_r3', *attrs)
         LatLonEllipsoidalBase._update(self, updated, *attrs)
Esempio n. 3
0
 def _update(self, updated, *attrs):
     '''(INTERNAL) Zap cached attributes if updated.
     '''
     if updated:  # reset caches
         if self._Nv:
             self._Nv._fromll = None
             self._Nv = None
         LatLonNvectorBase._update(self, updated, *attrs)
         LatLonSphericalBase._update(self, updated, *attrs)
 def _update(self, updated):
     '''(INTERNAL) Clear caches if updated.
     '''
     if updated:  # reset caches
         if self._Nv:
             self._Nv._fromll = None
             self._Nv = None
         self._r3 = None
         LatLonNvectorBase._update(self, updated)
         LatLonEllipsoidalBase._update(self, updated)
Esempio n. 5
0
    def toNvector(self, **Nvector_datum_kwds):  # PYCHOK signature
        '''Convert this point to L{Nvector} components, I{including
           height}.

           @kwarg Nvector_datum_kwds: Optional L{Nvector}, B{C{datum}} or
                                      other keyword arguments, ignored if
                                      B{C{Nvector=None}}.  Use
                                      B{C{Nvector=...}} to override this
                                      L{Nvector} class or specify
                                      B{C{Nvector=None}}.

           @return: The C{n-vector} components (L{Nvector}) or a
                    L{Vector4Tuple}C{(x, y, z, h)} if B{C{Nvector}}
                    is C{None}.

           @raise TypeError: Invalid B{C{Nvector}}, B{C{datum}} or other
                             B{C{Nvector_datum_kwds}}.

           @example:

           >>> p = LatLon(45, 45)
           >>> n = p.toNvector()
           >>> n.toStr()  # [0.50, 0.50, 0.70710]
        '''
        kwds = _xkwds(Nvector_datum_kwds, Nvector=Nvector, datum=self.datum)
        return LatLonNvectorBase.toNvector(self, **kwds)
    def toNvector(self, **kwds):  # PYCHOK signature
        '''Convert this point to L{Nvector} components, I{including
           height}.

           @keyword kwds: Optional, additional B{C{Nvector}} keyword
                          arguments, ignored if C{B{Nvector}=None}.
                          Specify C{Nvector=...} to override this
                          L{Nvector} class or set C{B{Nvector}=None}.

           @return: The B{C{Nvector}} components (L{Nvector}) or a
                    L{Vector4Tuple}C{(x, y, z, h)} if C{B{Nvector}=None}.

           @raise TypeError: Invalid B{C{Nvector}} or B{C{kwds}}.

           @example:

           >>> p = LatLon(45, 45)
           >>> n = p.toNvector()
           >>> n.toStr()  # [0.50, 0.50, 0.70710]
        '''
        kwds = _2kwds(kwds, Nvector=Nvector, datum=self.datum)
        return LatLonNvectorBase.toNvector(self, **kwds)
    def copy(self):
        '''Copy this point.

           @return: The copy (L{LatLon} or subclass thereof).
        '''
        return LatLonNvectorBase.copy(self)
Esempio n. 8
0
 def _update(self, updated, *attrs):  # PYCHOK args
     '''(INTERNAL) Zap cached attributes if updated.
     '''
     if updated:  # reset caches
         LatLonNvectorBase._update(self, updated, _Nv=self._Nv)  # special case
         LatLonSphericalBase._update(self, updated, *attrs)