Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. 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)
  2. calc100.processCalculation()
  3.  
  4. 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)
  5. calc100to5000.processCalculation()
  6.  
  7. 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)
  8. calc5000.processCalculation()
  9.  
  10. if d@1 < 100:
  11. 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)
  12. calc100.processCalculation()
  13.  
  14. if d@1 >= 100 and d@1 <= 5000:
  15. 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)
  16. calc100to5000.processCalculation()
  17.  
  18. if d@1 > 5000:
  19. 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)
  20. calc5000.processCalculation()
  21.  
  22. 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)
  23. calc100.processCalculation()
  24.  
  25. 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)
  26. calc100to5000.processCalculation()
  27.  
  28. 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)
  29. calc5000.processCalculation()
  30.  
  31. vuln = QgsRasterCalculator('v100@1 + v100to5000@1 + v5000@1', 'D:/maps/vuln.tif', 'GTiff', z100.extent(), z100.width(), z100.height(), entries)
  32. vuln.processCalculation()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement