2

In PCI Geomatic, I have two raster layer.raster1 identified like %1 and raster2 like %2.

if (%1 <= 10) then 
   %2 = 60
elseif (%1 > 10 and %1 <=50) then 
  %2=80
elseif (%1 > 50 and %1 <=90) then 
  %2=120
else
  %2=0
endif

Please, How can I do this in QGIS?

1
  • ("COUCHE12D@1" <= 189)*10 + ("COUCHE12D@1" > 189 AND "COUCHE12D@1" <=214 )*20 + ("COUCHE12D@1" > 214 AND "COUCHE12D@1" <=239 )*30 + ("COUCHE12D@1" > 239)*40 BUT DOES NOT WORK – user23686 Nov 7 '13 at 4:49
1

If you are using the Raster Calculator,raster2 should be:

("raster1@1">=10)*60+("raster1@1">10 AND "raster1@1"<=50 )*80+("raster1@1">50 AND "raster1@1"<=90)*120

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.