diff --git a/getS2THEIAFromShp.py b/getS2THEIAFromShp.py index 1f61cf141d15ab2d25bd8c23cbbec0dae31cc569..eb807de664d9457c3d65fc94ab953c1251842f8c 100644 --- a/getS2THEIAFromShp.py +++ b/getS2THEIAFromShp.py @@ -60,7 +60,7 @@ def main(argv): extent = getShapefileExtent_WGS84(shp_file) cmd = ['python', theia_folder+'/theia_download.py', '-a', id_file, '-w', output_folder, '-c', collection, - '--lonmin', str(extent[0]), '--lonmax', str(extent[2]), '--latmin', str(extent[3]), '--latmax', str(extent[1])] + '--lonmin', str(extent[0]), '--lonmax', str(extent[2]), '--latmin', str(extent[3]), '--latmax', str(extent[1]), '--level', 'LEVEL2A'] if date_beg != None : cmd += ['-d', date_beg] if date_end != None: diff --git a/preprocess.py b/preprocess.py index b5351a8c35ed65115d98056868860d6a5a26d3dc..1d1800e22b3a742e01bbcde849bc1bdd63268463 100644 --- a/preprocess.py +++ b/preprocess.py @@ -7,8 +7,9 @@ import sys from mtdUtils import setNoDataValue -def getSizeFromOTBInfo(str): - str_lines = str.split('\n') +def getSizeFromOTBInfo(string): + string = str(string) + str_lines = string.split('\\n') line = None W, H = -1, -1 for x in str_lines: