Skip to content

Commit

Permalink
Handling case where mask raster was just created. RE:natcap#366
Browse files Browse the repository at this point in the history
  • Loading branch information
phargogh committed Jan 31, 2024
1 parent b760933 commit ef70242
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pygeoprocessing/geoprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,10 @@ def align_and_resize_raster_stack(
if 'mask_raster_path' in vector_mask_options:
mask_raster_path = vector_mask_options['mask_raster_path']
else:
# Add the mask raster path ot the vector mask options to force
# warp_raster to use the existing raster mask.
mask_raster_path = os.path.join(temp_working_dir, 'mask.tif')
vector_mask_options['mask_raster_path'] = mask_raster_path
new_raster_from_base(
warped_vrt, mask_raster_path, gdal.GDT_Byte, [0], [0])

Expand Down

0 comments on commit ef70242

Please sign in to comment.