Initial support for Germany Cold War (#518)

* Initial support of Germany Cold War terrain

* Updated with latest beacon import

* Updated changelog and ran black

* Fixed the GermanyCW landmap and naming scheme

* Temporarily changed the requirements for pydcs to my branch (will switch back when merged)

* Updated landmap for germanycw with even fewer exclusions

* Removed unnecessary changes

* Updated requirements to lastest pydcs

* Fixed naming issues for Germany

* Update pydcs to latest commit for GCW support

* Add landmap to game.theater.__init__

* Update requirements.txt

* Resolve PyCharm type-waring

* Updated pydcs and exclusion of germany

* Updated land and sea shapefiles for Germany Cold War with new map limits

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
This commit is contained in:
Cedric Menard
2025-07-06 13:30:00 -04:00
committed by GitHub
parent 5254ef3442
commit 9a00a60cd4
26 changed files with 2268 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ from dcs.mission import Mission
from dcs.terrain.terrain import Terrain
from shapely import geometry, LineString
from shapely.geometry import MultiPolygon, Polygon
import shapely as shp
@dataclass(frozen=True)
@@ -28,6 +29,11 @@ class Landmap:
if not self.sea_zones.is_valid:
raise RuntimeError("Sea zones not valid")
# Generate Spatial Index using `prepare` to improve performance
shp.prepare(self.inclusion_zones)
shp.prepare(self.exclusion_zones)
shp.prepare(self.sea_zones)
@cached_property
def inclusion_zone_only(self) -> MultiPolygon:
return self.inclusion_zones - self.exclusion_zones - self.sea_zones