1

I work with raster layers (tif). I have to seperate buildings and vegetation (trees) from a DSM.

DSM - DTM with the rastercalculater gives me the buildings and the trees. (DSM and DOM combined)

But then I get where no trees or buildings are numbers like -0.00332... how can I "delete" those values from my new raster that all values under 2 are = 0?

2
  • 2
    Welcome to GIS:SE @thenewgisguy! Could you please clarify: do you want to remove all values less than 2 or all values less than 0 or change all values under 2 to 0 (or nodata)? – Joseph Oct 13 '17 at 9:25
  • 1
    You could arrange your new table on these Z-values and simply delete all these features below 2 or use the field calculator to change every value under 2 to NULL or 0. – Konan Pruiksma Oct 13 '17 at 9:32
6

Use raster calculator to set all values under 2 to 0:

("DEM@1">=2)*"DEM@1"

enter image description here

"DEM@1" represents the name of your layer (difference layer).

The output of "DEM@1">=2 will be a layer with 0 and 1 values. 1 if condition is TRUE and 0 for false. 1 * "DEM@1" will maintain original values (TRUE condition) and the other ones will be 0's.

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.