sync with O'Reilly Atlas

This commit is contained in:
Luciano Ramalho
2021-06-26 13:42:28 -03:00
parent e986e3bdc0
commit f0f160844d
26 changed files with 308 additions and 1004 deletions

View File

@@ -14,10 +14,10 @@ from dataclasses import dataclass
@dataclass(frozen=True)
class Coordinate:
lat: float
long: float
lon: float
def __str__(self):
ns = 'N' if self.lat >= 0 else 'S'
we = 'E' if self.long >= 0 else 'W'
return f'{abs(self.lat):.1f}°{ns}, {abs(self.long):.1f}°{we}'
we = 'E' if self.lon >= 0 else 'W'
return f'{abs(self.lat):.1f}°{ns}, {abs(self.lon):.1f}°{we}'
# end::COORDINATE[]