Update pydcs, adapt to new Point APIs.

This is briefly moving us over to my fork of pydcs while we wait for
https://github.com/pydcs/dcs/pull/206 to be merged. The adaptation is
invasive enough that I don't want it lingering for long.
This commit is contained in:
Dan Albert
2022-02-21 18:14:49 -08:00
parent ff12b37431
commit 9e2e4ffa74
29 changed files with 155 additions and 186 deletions

View File

@@ -17,7 +17,8 @@ class ShapelyUtil:
if poly.is_empty:
return []
return [
theater.point_to_ll(Point(x, y)).as_list() for x, y in poly.exterior.coords
Point(x, y, theater.terrain).latlng().as_list()
for x, y in poly.exterior.coords
]
@classmethod
@@ -34,7 +35,7 @@ class ShapelyUtil:
def line_to_leaflet(
line: LineString, theater: ConflictTheater
) -> list[LeafletLatLon]:
return [theater.point_to_ll(Point(x, y)).as_list() for x, y in line.coords]
return [Point(x, y, theater.terrain).latlng().as_list() for x, y in line.coords]
@classmethod
def lines_to_leaflet(