3

I have a raster with quantitative data (continuous values from a given minimum to a maximum). In this case its elevation, but it could also be temperature, precipitation, etc. Whenever I want to visualize these kind of raster data in QGIS I run into problems. I know I should use "singleband pseudocolour" and I can use the Interpolation / Mode / Classes options and I can also manually change the class breaks under "Value".

But how can I define an interval to automatically create classes? For example I want class intervals of e.g. 250 (0-250, 25-500, 500-750, 1000-1250, etc.). In ArcGIS it's quite easy to define this interval for ALL classes. There, the amount of classes is automatically calculated from the min / max values and the defined intervall. In QGIS I have to do all the work by myself. Especially changing all the class breaks manually can be a lot of work. In case I want to change the intervall (for example from 250 to 200), I have to do the manual work all over again.

Am I overlooking this option or is it just not possible to define a fixed intervall for all classes in QGIS?

1 Answer 1

4

There is nothing automatic like that in QGIS, but it is easy to achieve.

First you need to obtain the range of values (max value – min value). Then divide the result by the interval you want. This will give the approximate number of classes, just add 1. Then in the raster properties set the classification mode to equal interval and set the number of classes you have calculated.

For instance if your max value is 5,000 and your min value is 1,000 and you want to display in 500 meters classes. This will be a 4,000 meters difference between max and min values. This will give you initially 8 classes, adding 1 will be 9.

If your min and max value are not multiples of the value you want for your classes, you can set the min and max values settings to user defined and enter min and max values that are multiple of the value you want for your classes.

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.