Commit 638786f7 authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Added optional amount of buffering.

parent 12ac8d92
......@@ -2827,7 +2827,9 @@ def clip_raster(src_ds, mask_ds, trg_ds, buffer=None, fmt=None,
tmp_path = _tmp_path(trg_path)
# check if a buffer is specified
extent = [x + buffer for x in extent] if buffer is not None else extent
if buffer is not None:
extent = [extent[0] - buffer, extent[1] - buffer,
extent[2] + buffer, extent[3] + buffer]
# clip raster extent
LOGGER.info('Clipping: {}, Extent: (x_tl={:.2f}, y_br={:.2f}, x_br={:.2f},'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment