2

I have 2 raster layers. The first is a mobile signal coverage raster with 0 and 1 values. The second is a population raster with value from 0.89 to 236. I want to transfer the population layer to the mobile signal coverage raster. I am using the raster calculation function in QGIS. Also, the extent that I use is the mobile signal extent. The calculation I am using is:

(“mobilesignal@1” >= 0) * “population@1"

But the result is not correct and the population numbers on the mobile signal raster are way too low.

Can anyone help me with the correct calculation?

1 Answer 1

1

If I understood correctly (you want to transfer population layer values to mobile signal raster only where its value is 1 ?)

“mobilesignal@1” * “population@1"

should work.

Then you can use Raster > Conversion > Translate if you want to replace 0s with no data / null.

2
  • That is exactly right. The population layer has values up until 236 and the mobile signal layer is 0 or 1. But when I do the “mobilesignal@1” * “population@1" (using mobile signal as the extent), only some of the population data is transferred to the new raster file. I can't work out why.
    – SteveE
    Apr 20, 2018 at 3:45
  • Do the rasters have the same resolution and are the pixels aligned? If they're not then the calculation may do a proportional area calculation rather than just a straight pixel*pixel calc? Mar 19, 2021 at 9:02

Your Answer

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

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