[Qgis-user] Possibility for Raster Natural Breaks Reclassification in QGIS

Bram Roozen bramroozen1997 at hotmail.com
Wed Apr 21 07:52:50 PDT 2021


Dear,

I am using PyQGIS in QGIS 3.10 and I am working on a script to standardise and automate heatmap creation. Currently, the only way (by my knowledge) to reclassify rasters in QGIS (through the Processing Toolbox) is with r.reclass or the SAGA reclassify values (simple and 'not simple'). r.reclass only allows for an input text file with set numbers as intervals, which isn't optimal if an automated reclassification is desired based on data distribution. SAGA reclassify is only able to work with set values in a table. The same issue arises here with the inabilities for automated reclassification.

r.quant or r.quantiles also exists, but neither actually apply the quantiles for the raster to a new dataset.

In ArcPy, there is an option called 'slice' which exactly performs this trick. Is there a way that this can be achieved in QGIS/PyQGIS, so that automation can be achieved through the modeler, possibly with different reclassification methods (quantiles, equal intervals, natural breaks, etc)?

I have also posted this question on Stack Overflow, a link to that post can be found here: https://stackoverflow.com/questions/67191805/is-there-a-function-in-pyqgis-qgis-3-10-similar-to-the-slice-function-in-ar

I hope that one will be able to answer this question. Thanks in advance.

Kind regards,
Bram Roozen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210421/94bd02d4/attachment.html>


More information about the Qgis-user mailing list