[processing] fix passing distunits parameter for GDAL proximity (fix #8247)

This commit is contained in:
Alexander Bruy 2013-09-14 17:24:46 +03:00
parent fbedfae8ef
commit fd50ac0533

View File

@ -48,8 +48,12 @@ creation_type = 'Float32'
gdal.AllRegister()
options.append( 'MAXDIST=' + str(maxdist))
options.append( 'VALUES=' + values )
options.append( 'DISTUNITS=' + str(distunits))
if len(values) > 0:
options.append( 'VALUES=' + values )
if distunits == 0:
options.append( 'DISTUNITS=GEO')
else:
options.append( 'DISTUNITS=PIXEL')
options.append( 'NODATA=' + str(nodata))
options.append( 'FIXED_BUF_VAL=' +str(fixed_buf_val))