0

I created 4 height classes on a raster:

 ( "diff_2019-2016@1"   <= 0) *0 +  
("diff_2019-2016@1" > 0 AND  "diff_2019-2016@1" <= 0.5) *0.5 + 
( "diff_2019-2016@1" > 0.5 AND  "diff_2019-2016@1" <= 1) *1  +
( "diff_2019-2016@1" > 1) *2 

When I polygonize this raster, I'm left with three classes (class 0-0.5 and 0.5-1 merge).

I don't understand my mistake.

enter image description here

1 Answer 1

1

Chances are the classes have been assigned to an integer field, so the values are rounded and are therefore aggregated.

5
  • @`L'HGJ How do I assign values to a decimal field?
    – fcka
    Dec 1, 2023 at 16:46
  • 1
    I don't know which tool you have used :) Otherwise assign integer values to the classes
    – JGH
    Dec 1, 2023 at 16:50
  • Sorry, I thought it would work with the 'data_type' parameter but I can't pass it in the raster to vector polygon window. So I'm open to ideas
    – fcka
    Dec 1, 2023 at 22:25
  • 1
    @fcka then assign integer values to the classes
    – JGH
    Dec 2, 2023 at 23:22
  • @ JGH That's exactly it. It works. THANKS ! example: ( "diff_2024-2016@1" <= 0) *0 + ("diff_2024-2016@1" > 0 AND "diff_2024-2016@1" <= 0.5) *1+ ( "diff_2024-2016@1" > 0.5 AND "diff_2024-2016@1" <= 1) *2 + ( "diff_2024-2016@1" > 1) *3
    – fcka
    Dec 3, 2023 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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