Exemplo n.º 1
0
 def _xcopy(self, *attrs):
     '''(INTERNAL) Make copy with add'l, subclass attributes.
     '''
     return _xattrs(self.classof(self.zone, self.hemisphere,
                                 self.easting, self.northing,
                                 band=self.band, datum=self.datum),
                    self, *attrs)
Exemplo n.º 2
0
 def _xcopy(self, *attrs):
     '''(INTERNAL) Make copy with add'l, subclass attributes.
     '''
     return _xattrs(
         self.classof(self.easting,
                      self.northing,
                      h=self.height,
                      conic=self.conic), self, *attrs)
Exemplo n.º 3
0
 def _xcopy(self, *attrs):
     '''(INTERNAL) Make copy with add'l, subclass attributes.
     '''
     return _xattrs(self.classof(self.pole, self.easting, self.northing,
                                 band=self.band, datum=self.datum,
                                 convergence=self.convergence,
                                 scale=self.scale),
                    self, *attrs)
Exemplo n.º 4
0
    def unit(self):
        '''Normalize this vector to unit length.

           @return: Normalized vector (L{Nvector}).
        '''
        if self._united is None:
            u = Vector3d.unit(self)  # .copy()
            self._united = u._united = _xattrs(u, self, '_h')
        return self._united
Exemplo n.º 5
0
 def _latlon5(self, LatLon):
     '''(INTERNAL) Convert cached LatLon
     '''
     ll = self._latlon
     if LatLon is None:
         return ll.lat, ll.lon, ll.datum, ll.convergence, ll.scale
     elif issubclass(LatLon, _LLEB):
         return _xnamed(_xattrs(LatLon(ll.lat, ll.lon, datum=ll.datum),
                                ll, '_convergence', '_scale'), ll.name)
     raise TypeError('%s not ellipsoidal: %r' % ('LatLon', LatLon))
Exemplo n.º 6
0
    def unit(self, ll=None):
        '''Normalize this vector to unit length.

           @keyword ll: Optional, original latlon (C{LatLon}).

           @return: Normalized vector (L{Nvector}).
        '''
        if self._united is None:
            u = Vector3d.unit(self, ll=ll)  # .copy()
            self._united = u._united = _xattrs(u, self, '_h')
        return self._united
Exemplo n.º 7
0
 def _xcopy(self, *attrs):
     '''(INTERNAL) Make copy with add'l, subclass attributes.
     '''
     return _xattrs(self.classof(self.x, self.y, self.z), self, '_length',
                    '_united', *attrs)  # _crosserrors
Exemplo n.º 8
0
 def _xcopy(self, *attrs):
     '''(INTERNAL) Make copy with add'l, subclass attributes.
     '''
     c = Conic(None, 0, name=self._name)
     self._dup2(c)
     return _xattrs(c, self, *attrs)
Exemplo n.º 9
0
 def _xcopy(self, *attrs):
     '''(INTERNAL) Make copy with add'l, subclass attributes.
     '''
     return _xattrs(self.classof(self.lat0, self.lon0, datum=self.datum),
                    self, *attrs)