def toEtm(self): '''Convert this C{LatLon} point to an ETM coordinate. @return: The ETM coordinate (L{Etm}). @see: Function L{toEtm8}. ''' if self._etm is None: from pygeodesy.etm import toEtm8, Etm # PYCHOK recursive import self._etm = toEtm8(self, datum=self.datum, Etm=Etm) return self._etm
def testEtm(self, LatLon): self.subtitle(etm, LatLon.__name__) e = etm.toEtm8(ellipsoidalVincenty.LatLon(-2, 88)) # coverage t = '45 S -20297797 5336899' self.test('toEtm8', e, t) u = e.toUtm() self.test('toUtm', u, t) self.test('toETM5', etm.parseETM5(t), e) self.testCopy(e)
def testEtm(self, LatLon): self.subtitle(etm, LatLon.__name__) e = etm.toEtm8(ellipsoidalVincenty.LatLon(-2, 88), name='test') # coverage t = '45 S -20297797 5336899' self.test('toEtm8', e, t) self.test('name', e.name, 'test') u = e.toUtm() self.test('toUtm', u, t) self.test('name', u.name, 'test') self.test('toETM5', etm.parseETM5(t), e) self.testCopy(e, 'name') e = e.parse('31 N 448251, 5411932', name='parse') # coverage t = '31 N 448251 5411932' self.test('parse', e, t) self.test('name', e.name, 'parse') e = e.parseETM(t.replace(' ', ',')) self.test('parseETM', e, t) self.test('name', e.name, 'parse')