From 5b2a733f1a267f17c40ec12ecbaeb09dc7b8aa0f Mon Sep 17 00:00:00 2001 From: Ewout ter Hoeven Date: Mon, 2 Sep 2024 13:07:15 +0200 Subject: [PATCH] gis: Pass model to RasterLayer.from_file --- gis/population/population/space.py | 1 + gis/rainfall/rainfall/space.py | 1 + 2 files changed, 2 insertions(+) diff --git a/gis/population/population/space.py b/gis/population/population/space.py index 6dce4b2c..8edd5a3e 100644 --- a/gis/population/population/space.py +++ b/gis/population/population/space.py @@ -37,6 +37,7 @@ def load_data(self, population_gzip_file, lake_zip_file, world_zip_file, model): world_size = gpd.GeoDataFrame.from_file(world_zip_file) raster_layer = RasterLayer.from_file( f"/vsigzip/{population_gzip_file}", + model=model, cell_cls=UgandaCell, attr_name="population", ) diff --git a/gis/rainfall/rainfall/space.py b/gis/rainfall/rainfall/space.py index 77e9dccd..28769446 100644 --- a/gis/rainfall/rainfall/space.py +++ b/gis/rainfall/rainfall/space.py @@ -35,6 +35,7 @@ def __init__(self, crs, water_height, model): def set_elevation_layer(self, elevation_gzip_file, crs): raster_layer = mg.RasterLayer.from_file( f"/vsigzip/{elevation_gzip_file}", + model=self.model, cell_cls=LakeCell, attr_name="elevation", )