Skip to content

Commit

Permalink
Merge branch 'fix-shape_avialability-efficiency' of github.com:calvin…
Browse files Browse the repository at this point in the history
…tr/atlite into pr/calvintr/243
  • Loading branch information
FabianHofmann committed Jun 8, 2022
2 parents 34a2de7 + 17c2fbc commit c67bebd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions atlite/gis.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def shape_availability(geometry, excluder):

# For the following: 0 is eligible, 1 in excluded
raster = None
for idx, d in enumerate(excluder.rasters, start=1):
for d in excluder.rasters:
# allow reusing preloaded raster with different post-processing
if raster != d["raster"]:
raster = d["raster"]
Expand All @@ -462,7 +462,7 @@ def shape_availability(geometry, excluder):

exclusions = exclusions | masked_

for idx, d in enumerate(excluder.geometries, start=1):
for d in excluder.geometries:
masked = ~geometry_mask(d["geometry"], shape, transform, invert=d["invert"])
exclusions = exclusions | masked

Expand Down

0 comments on commit c67bebd

Please sign in to comment.