def unit(self, ll=None): '''Normalize this n-vector to unit length. @kwarg ll: Optional, original latlon (C{LatLon}). @return: Normalized vector (C{Nvector}). ''' if self._united is None: u = Vector3d.unit(self, ll=ll) # .copy() self._united = u._united = _xattrs(u, self, '_h') return self._united
def _latlon5(self, LatLon, **LatLon_kwds): '''(INTERNAL) Convert cached LatLon ''' ll = self._latlon if LatLon is None: r = LatLonDatum5Tuple(ll.lat, ll.lon, ll.datum, ll.convergence, ll.scale) else: _xsubclassof(_LLEB, LatLon=LatLon) kwds = _xkwds(LatLon_kwds, datum=ll.datum) r = _xattrs(LatLon(ll.lat, ll.lon, **kwds), ll, '_convergence', '_scale') return _xnamed(r, ll.name)