[prev in list] [next in list] [prev in thread] [next in thread]
List: qgis-user
Subject: [Qgis-user] Possibility for Raster Natural Breaks Reclassification in QGIS
From: Bram Roozen <bramroozen1997 () hotmail ! com>
Date: 2021-04-21 14:52:50
Message-ID: AM8P191MB1137C8A59E36E08CD2D3D065D6479 () AM8P191MB1137 ! EURP191 ! PROD ! OUTLOOK ! COM
[Download RAW message or body]
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.recl=
ass 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 o=
ptimal if an automated reclassification is desired based on data distributi=
on. SAGA reclassify is only able to work with set values in a table. The sa=
me issue arises here with the inabilities for automated reclassification.
r.quant or r.quantiles also exists, but neither actually apply the quantile=
s for the raster to a new dataset.
In ArcPy, there is an option called 'slice' which exactly performs this tri=
ck. Is there a way that this can be achieved in QGIS/PyQGIS, so that automa=
tion can be achieved through the modeler, possibly with different reclassif=
ication 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-fun=
ction-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
[Attachment #3 (text/html)]
<html xmlns:v="urn:schemas-microsoft-com:vml" \
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=us-ascii">
<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;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NL" link="#0563C1" vlink="#954F72" 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"><span lang="EN-US">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.<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">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 \
have also posted this question on Stack Overflow, a link to that post can be found \
here: <a href="https://stackoverflow.com/questions/67191805/is-there-a-function-in-pyqgis-qgis-3-10-similar-to-the-slice-function-in-ar">
https://stackoverflow.com/questions/67191805/is-there-a-function-in-pyqgis-qgis-3-10-similar-to-the-slice-function-in-ar</a><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> </div>
</body>
</html>
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
--===============3113403188440371003==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic