mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user