I am new of programming and I need help for it.
I would use gdal_edit
to modify SRC of 300 hundred aerial photos, if I use this tool one by one work perfectly, but I would want to use it in a cycle in a python script to simplify and get faster my job.
This is the tool I used:
gdal_edit -a_srs EPSG:3004 "C:/Users/Laptop/Desktop/test/img.ecw"
While this is the python script in that I would use this tool:
import os, gdal
dir="C:/Users/Laptop/Desktop/test"
array=os.listdir(dir)
for e in array:
if os.path.splitext(e)[1]==".ecw":
print(e)
gdal_edit -a_srs EPSG:3004 dir+e
How can I use gdal_edit
in this code?
I use OsGeo4W Shell that has gdal and python preinstallated.