Geographic Information Systems Asked by Jung TaeJun on April 29, 2021
I have a DEM like below image. The black area shows 0
-values.
I want to remove cells of 0
-values in the raster.
In raster calculator, I wrote con("demclip_re@1">0,"demclip_re@1")
but it gives "Incorrect expression"
.
What is wrong with my expression?
Con is an ArcGIS raster tool which is not available in QGIS.
If you want to replace all 0
value cells with nodata
, you could use something like:
("demclip_re@1") / ("demclip_re@1">0)
Answered by Joseph on April 29, 2021
I've tested the ("demclip_re@1") / ("demclip_re@1">0)
and it worked almost perfectly. The only problem in my case was that it also excluded negative values and I wanted only 0 values excluded. Therefore, the best solution for me was:
("demclip_re@1") / ("demclip_re@1" != 0)
Answered by Flavio H. Campos on April 29, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP