0

I have calculated the NDVI of an area of interest for 2015 (Landsat 8) and 2023 (Landsat 9) in QGIS. I want to detect NDVI change between the two rasters by subtracting NDVI values in Raster Calculator. I am using a formula from a similar post which is:

"(-1) * ("S2_NDVI_2015@1" < 0) * (("S2_NDVI_2018@1" - "S2_NDVI_2015@1" ) / "S2_NDVI_2015@1") * 100 + ("S2_NDVI_2015@1" >= 0) * (("S2_NDVI_2018@1" - "S2_NDVI_2015@1" ) / "S2_NDVI_2015@1") * 100".

My resulting map is having an extremely large positive value and an extremely low negative value which produces an all white raster output.

I am new to QGIS.

Without NDVI Raster output

NDVI difference raster output

1 Answer 1

1

While I'm not sure exactly why QGIS outputs those extreme limits (would love to hear the underlying explanation), this can be easily remediated by tweaking the min/max values in the raster's properties (The properties are accessible by right-clicking the concerned Raster and choosing Properties..).

If I try a raw NDVI difference with two rasters, I get these large values as well:

Map with incorrect min/max

Changing my min/max to -1 and 1 in the properties:

Raster Properties Menu

After the change, I get a legible map:

Legible Map

As you seem to be working with Percent Change, I suggest setting your limits to -100 and 100 to get the proper range.

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.