mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-25 15:06:32 +02:00
Add one more boundary box test.
This commit is contained in:
parent
db3316d364
commit
43f46035a4
2 changed files with 10 additions and 7 deletions
|
@ -188,12 +188,9 @@ class Tile:
|
|||
self.x + 1, self.y + 1, self.scale
|
||||
).get_coordinates()
|
||||
|
||||
lat_2 = point_1[0]
|
||||
lon_1 = point_1[1]
|
||||
lat_1 = point_2[0]
|
||||
lon_2 = point_2[1]
|
||||
|
||||
return BoundaryBox(lon_1, lat_1, lon_2, lat_2).round()
|
||||
return BoundaryBox(
|
||||
point_1[1], point_2[0], point_2[1], point_1[0]
|
||||
).round()
|
||||
|
||||
def load_map(self, cache_path: Path) -> Map:
|
||||
"""
|
||||
|
|
|
@ -7,7 +7,13 @@ __author__ = "Sergey Vartanov"
|
|||
__email__ = "me@enzet.ru"
|
||||
|
||||
|
||||
def test_extend() -> None:
|
||||
def test_round_zero_coordinates() -> None:
|
||||
box: BoundaryBox = BoundaryBox(0, 0, 0, 0).round()
|
||||
|
||||
assert box.get_format() == "-0.001,-0.001,0.001,0.001"
|
||||
|
||||
|
||||
def test_round_coordinates() -> None:
|
||||
box: BoundaryBox = BoundaryBox(
|
||||
10.067596435546875,
|
||||
46.094186149226466,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue