Merge pull request #437 from PyPSA/build-natura-raster-correct-shapes

build_natura_raster: fix out_shapes
This commit is contained in:
Fabian Neumann 2022-10-31 12:09:43 +01:00 committed by GitHub
commit b356f08982
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ if __name__ == "__main__":
# adjusted boundaries # adjusted boundaries
shapes = gpd.read_file(snakemake.input.natura).to_crs(3035) shapes = gpd.read_file(snakemake.input.natura).to_crs(3035)
raster = ~geometry_mask(shapes.geometry, out_shape[::-1], transform) raster = ~geometry_mask(shapes.geometry, out_shape, transform)
raster = raster.astype(rio.uint8) raster = raster.astype(rio.uint8)
with rio.open( with rio.open(