Using this command i do sen2cor for one image Popen([‘cmd’, ‘/K’, ‘Sen2Cor-2.4.0-win64\L2A_Process E:\diplomatiki\S2A_MSIL1C_20170910T090021_N0205_R007_T35SMD_20170910T090725.SAFE --resolution=20’]).

Is it possible to do sen2cor for a folder containg sentinel images using python script and Popen command? How you would specify the folder containing all the SAFE products in the argument ? Other way to do batch processing using stand alone sen2cor and python ?


Can you please share your answer? It would help me out!

for file in os.listdir(inFolder):
print path

if path.rfind(‘S2B_MSIL1C’)!=-1 or path.rfind(‘S2A_MSIL1C’)!=-1 :
print (‘Reading image:’)
print (‘Applying atmoshphheric correction with sen2cor’)
print os.getcwd()
cmd = ‘Sen2Cor-02.05.05-win64\L2A_Process ‘+path+’ --resolution=60’, shell=True)

1 Like