Add Pixel.northeast/southwest properties

- the properties are needed for the drawing functionalitites
This commit is contained in:
Alexander Hess 2021-01-26 17:02:51 +01:00
commit 605ade4078
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
5 changed files with 96 additions and 2 deletions

View file

@ -2,7 +2,7 @@
from __future__ import annotations
from typing import Optional
from typing import Optional, Tuple
import utm
@ -82,6 +82,11 @@ class Location:
"""The UTM zone of the location."""
return f'{self._zone}{self._band}'
@property
def zone_details(self) -> Tuple[int, str]:
"""The UTM zone of the location as the zone number and the band."""
return (self._zone, self._band)
def __eq__(self, other: object) -> bool:
"""Check if two `Location` objects are the same location."""
if not isinstance(other, Location):