2

I've encountered the following problem frequently when I am using the raster calculator, even though sometimes the calculator works. However, I cannot figure out the difference between the times it works and the ones it does not.

The raster layer I am using is a gridded population. I want to create a mask layer with 1 meaning that there exists a population larger than 100 in the grid and 0 otherwise. The operation I use is ("lspop2010@1" > 100) * 1.

The output range is depicted in the picture below. Basically, the calculation produces a layer with no-data values only. Does anyone know the source of this problem?

example

1

"Reclassify by table" in the Processing toolbox did the job.

There, you just need to define the range values and click the box "use no-data when no range matches value". Then you will get your mask layer.

Thanks to GBG for suggesting the post where I found the solution.

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.