def apply_xy_shift(ds, dx, dy, createcopy=True):
print("<STR_LIT>", dx)<EOL>print("<STR_LIT>", dy)<EOL>gt_orig = ds.GetGeoTransform()<EOL>gt_shift = np.copy(gt_orig)<EOL>gt_shift[<NUM_LIT:0>] += dx <EOL>gt_shift[<NUM_LIT:3>] += dy<EOL>print("<STR_LIT>", gt_orig)<EOL>print("<STR_LIT>", gt_shift)<EOL>if createcopy:<EOL><INDENT>ds_align = iolib.mem_drv.CreateCopy('<STR_LIT>', ds, <NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>ds_align = ds<EOL><DEDENT>ds_align.SetGeoTransform(gt_shift)<EOL>return ds_align<EOL>
Apply horizontal shift to GDAL dataset GeoTransform

Returns:
GDAL Dataset copy with updated GeoTransform