You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2019. It is now read-only.
Hello everyone how can I apply this function to all files in folder?
The function in question extracts the bands from a raster file (.ecw) and I would like to be able to do it to all the files in folder.
What should I do?
import gdal
in_path = "C:/gis_data/ECW"
out_path ="C:/gis_data/output"
src_ds = gdal.Open(in_path)
for i in range(1,src_ds.RasterCount+1):
out_ds = gdal.Translate(out_path + 'test' + str(i) + '.ecw', src_ds, format='GTiff', bandList=[i])
out_ds=None