<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="NL" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Dear,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal">I am using PyQGIS in QGIS 3.10 and I am working on a script to standardise and automate heatmap creation. C<span lang="EN-US">urrently, 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.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">r.quant or r.quantiles also exists, but neither actually apply the quantiles for the raster to a new dataset.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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)? <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I hope that one will be able to answer this question. Thanks in advance.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Kind regards, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Bram Roozen</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>