2

I am working with an elevation raster. I have assigned it color ramp symbology based on elevation. It looks like as the image shown below currently when zoomed to the layer.

Raster Symbology QGIS, Zoomed to the Layer

But when I zoom in to start working on the map, the symbology is still the same; hence the color difference is not stark enough to differentiate between low points and high points.

My question is that; is there a plugin which can, with the help of one button press, reset my symbology based on my current extent so that the highest point in that area and the lowest point have entirely different colors.

In ArcMap, one can do that easily with the reset legend elevation option for TINs and Terrains as shown in the second picture below.

ArcMap TIN Legend Reset to the Current Extent

I am looking for something similar in QGIS for rasters. If there is no plugin already, can this kind of plugin be created using Python ?

6

Yes there is, in QGIS 3 at least (I'm on QGIS 3.4, but I think this came in 3.2? Or maybe earlier)

In the raster symbology, change statistics min/max settings to "Updated canvas" and make sure accuracy is "actual (slower)"

enter image description here

As you zoom in and pan around, the colour ramp will be clamped to the min/max values of the current extent.

  • Thanks Steven, This answered my exact question. Thanks again for the quick reply. – Someone191 Apr 29 at 19:44
  • It would be appropriate then if you mark it as accepted. – TomazicM Apr 29 at 20:04
  • Thanks. I am new to stack exchange didn't know this feature. I will do it. – Someone191 Apr 29 at 20:34

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.