Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- calc100 = QgsRasterCalculator('aa@1*(1/28) + ao@1*(2/28) + am@1*(1/28) + ct@1*(6/28) + ln@1*(6/28) + ea@1*(2/28) + gl@1*(6/28) + gm@1*(2/28) + rs@1*(2/28)', 'D:/maps/z100.tif', 'GTiff', aco_ant.extent(), aco_ant.width(), aco_ant.height(), entries)
- calc100.processCalculation()
- calc100to5000 = QgsRasterCalculator('ln@1 * (6/28+0.665*(d@1-100)/4900) + ct@1 * (6/28-0.665*(d@1-100)*6/(4900*22)) + gl@1 * (6/28-0.665*(d@1-100)*6/(4900*22)) + gm@1 * (2/28-0.665*(d@1-100)*2/(4900*22)) + rs@1 * (2/28-0.665*(d@1-100)*2/(4900*22)) + ao@1 * (2/28-0.665*(d@1-100)*2/(4900*22)) + ea@1 * (2/28-0.665*(d@1-100)*2/(4900*22)) + am@1 * (1/28-0.665*(d@1-100)/(4900*22)) + aa@1 * (1/28-0.665*(d@1-100)/(4900*22))', 'D:/maps/z100to5000.tif', 'GTiff', aco_ant.extent(), aco_ant.width(), aco_ant.height(), entries)
- calc100to5000.processCalculation()
- calc5000 = QgsRasterCalculator('ln@1 * 0.879 + ct@1 * 0.033 + gl@1 * 0.033 + gm@1 * 0.011 + rs@1 * 0.011 + ao@1 * 0.011 + ea@1 * 0.011 + am@1 * 0.005 + aa@1 * 0.005', 'D:/maps/z5000.tif', 'GTiff', aco_ant.extent(), aco_ant.width(), aco_ant.height(), entries)
- calc5000.processCalculation()
- if d@1 < 100:
- calc100 = QgsRasterCalculator('aa@1*(1/28) + ao@1*(2/28) + am@1*(1/28) + ct@1*(6/28) + ln@1*(6/28) + ea@1*(2/28) + gl@1*(6/28) + gm@1*(2/28) + rs@1*(2/28)', 'D:/maps/z100.tif', 'GTiff', aco_ant.extent(), aco_ant.width(), aco_ant.height(), entries)
- calc100.processCalculation()
- if d@1 >= 100 and d@1 <= 5000:
- calc100to5000 = QgsRasterCalculator('ln@1 * (6/28+0.665*(d@1-100)/4900) + ct@1 * (6/28-0.665*(d@1-100)*6/(4900*22)) + gl@1 * (6/28-0.665*(d@1-100)*6/(4900*22)) + gm@1 * (2/28-0.665*(d@1-100)*2/(4900*22)) + rs@1 * (2/28-0.665*(d@1-100)*2/(4900*22)) + ao@1 * (2/28-0.665*(d@1-100)*2/(4900*22)) + ea@1 * (2/28-0.665*(d@1-100)*2/(4900*22)) + am@1 * (1/28-0.665*(d@1-100)/(4900*22)) + aa@1 * (1/28-0.665*(d@1-100)/(4900*22))', 'D:/maps/z100to5000.tif', 'GTiff', aco_ant.extent(), aco_ant.width(), aco_ant.height(), entries)
- calc100to5000.processCalculation()
- if d@1 > 5000:
- calc5000 = QgsRasterCalculator('ln@1 * 0.879 + ct@1 * 0.033 + gl@1 * 0.033 + gm@1 * 0.011 + rs@1 * 0.011 + ao@1 * 0.011 + ea@1 * 0.011 + am@1 * 0.005 + aa@1 * 0.005', 'D:/maps/z5000.tif', 'GTiff', aco_ant.extent(), aco_ant.width(), aco_ant.height(), entries)
- calc5000.processCalculation()
- calc100 = QgsRasterCalculator('(d@1 < 100)*(aa@1*(1/28) + ao@1*(2/28) + am@1*(1/28) + ct@1*(6/28) + ln@1*(6/28) + ea@1*(2/28) + gl@1*(6/28) + gm@1*(2/28) + rs@1*(2/28))', 'D:/maps/z100.tif', 'GTiff', aco_ant.extent(), aco_ant.width(), aco_ant.height(), entries)
- calc100.processCalculation()
- calc100to5000 = QgsRasterCalculator('(d@1 >= 100 AND d@1<=5000)*(ln@1 * (6/28+0.665*(d@1-100)/4900) + ct@1 * (6/28-0.665*(d@1-100)*6/(4900*22)) + gl@1 * (6/28-0.665*(d@1-100)*6/(4900*22)) + gm@1 * (2/28-0.665*(d@1-100)*2/(4900*22)) + rs@1 * (2/28-0.665*(d@1-100)*2/(4900*22)) + ao@1 * (2/28-0.665*(d@1-100)*2/(4900*22)) + ea@1 * (2/28-0.665*(d@1-100)*2/(4900*22)) + am@1 * (1/28-0.665*(d@1-100)/(4900*22)) + aa@1 * (1/28-0.665*(d@1-100)/(4900*22)))', 'D:/maps/z100to5000.tif', 'GTiff', aco_ant.extent(), aco_ant.width(), aco_ant.height(), entries)
- calc100to5000.processCalculation()
- calc5000 = QgsRasterCalculator('(d@1 > 5000)*(ln@1 * 0.879 + ct@1 * 0.033 + gl@1 * 0.033 + gm@1 * 0.011 + rs@1 * 0.011 + ao@1 * 0.011 + ea@1 * 0.011 + am@1 * 0.005 + aa@1 * 0.005)', 'D:/maps/z5000.tif', 'GTiff', aco_ant.extent(), aco_ant.width(), aco_ant.height(), entries)
- calc5000.processCalculation()
- vuln = QgsRasterCalculator('v100@1 + v100to5000@1 + v5000@1', 'D:/maps/vuln.tif', 'GTiff', z100.extent(), z100.width(), z100.height(), entries)
- vuln.processCalculation()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement