from PIL import Image, ImageFilter import os.path import PIL import numpy as np import time from sentinelhub import BBoxSplitter from pathlib import Path from osgeo import gdal import os from osgeo import gdal from osgeo import osr import numpy as np import os,sys folder_name = 'varanasi/varanasi_1' file_list = [f"{x}" for x in Path(folder_name).iterdir()] gdal.BuildVRT((folder_name+'/merged.vrt'), file_list) # time.sleep(10) # folder_name = 'tif_2022-09-10' # Convert to JPEG try: gdal.Translate((folder_name+'/out.jpeg'),(folder_name + '/merged.vrt')) except Exception as e: print(e) gdal.Translate((folder_name+'/out.jpeg'),(folder_name + '/merged.vrt'))