1

This is the formula for calculating stdev. My goal is to get raster but I'm getting a result in python console [ ] insted of raster.

formula_st = '((' + str(k) + '-2)/(' + str(k) + '-1)*C + (1/' + str(k) + ')*(A-B)*(A-B))'
st_dev_slope=processing.runalg('gdalogr:rastercalculator', average_slope, 1, slope_poc, 1, st_dev_poc, 1, None, 0, None, 0, None, 0, formula_st, '', 5, '0', None)
X = QgisRasterLayer(st_dev_slope['OUTPUT'])

QgisMapLayerRegistry.instance().addMapLayer([X])

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.