Commit dfa4fece authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Change clip to gdal>=3.0.

parent be7c90a6
......@@ -2812,8 +2812,8 @@ def clip_raster(src_ds, mask_ds, trg_ds, fmt=None, overwrite=False,
# TransfromPoint expects input:
# - gdal >= 3.0: x, y, z = TransformPoint(y, x)
# - gdal < 3.0 : x, y, z = TransformPoint(x, y)
x_tl, y_tl, _ = crs_tr.TransformPoint(extent[0], extent[-1])
x_br, y_br, _ = crs_tr.TransformPoint(extent[1], extent[2])
x_tl, y_tl, _ = crs_tr.TransformPoint(extent[-1], extent[0])
x_br, y_br, _ = crs_tr.TransformPoint(extent[2], extent[1])
# extent of the mask in the source reference coordinate system:
# (x_min, y_min, x_max, y_max)
......
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