Commit 1b23e1ee authored by Manuel Grizonnet's avatar Manuel Grizonnet

ENH: replace gdal translate subprocess

parent cab6a89b
......@@ -315,7 +315,7 @@ class snow_detector :
def pass0(self):
#Pass -1 : generate custom cloud mask
#Extract red band
call_subprocess(["gdal_translate", "-a_nodata", str(self.nodata),"-ot","Int16","-b",str(self.nRed),self.img,self.redBand_path])
gdal.Translate(self.redBand_path,self.img,format = 'GTiff', outputType = gdal.GDT_Int16, noData=self.nodata, bandList = [self.nRed])
dataset = gdal.Open( self.redBand_path, GA_ReadOnly )
......@@ -328,7 +328,7 @@ class snow_detector :
#Resample red band nn
#FIXME: use MACCS resampling filter contribute by J. Michel here
#FIXME: use MACCS resampling filter contribute in OTB 5.6 here
#edit result to set the resolution to the input image resolution
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment