<html style="direction: ltr;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style id="bidiui-paragraph-margins" type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body bidimailui-charset-is-forced="true" style="direction: ltr;">
<p><br>
</p>
<div class="moz-cite-prefix">On 23/06/2022 21:51, carlos h via
Qgis-user wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKrv22w0XDuVQdoyMuwvcqiZsVUBPnmpCNgB9A3r3Kcbsybk8A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr"><br>
Hello, I have an NDVI image that has a pixel of 4 centimeters,
that is, 16 square centimeters.<br>
<br>
I have 2 doubts:<br>
<br>
1. What method can I use to generalize the NDVI image to 1
square meter in pixel size?<br>
</div>
</blockquote>
<p>One of the tools that you can use within QGIS to resample to a
coarser resolution is gdal_translate.</p>
<p>From the documentation you can set the target resolution:<br>
</p>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-gdal_translate-tr"><font
face="monospace"><span class="sig-name descname"><span
class="pre">-tr</span></span><span class="sig-prename
descclassname"> <span class="pre"><xres></span> <span
class="pre"><yres></span></span><a
class="headerlink"
href="https://gdal.org/programs/gdal_translate.html#cmdoption-gdal_translate-tr"
title="Permalink to this definition"></a></font></dt>
<dd>
<p><font face="monospace">set target resolution. The values must
be expressed in georeferenced units.
Both must be positive values. This is mutually exclusive
with
<a class="reference internal"
href="https://gdal.org/programs/gdal_translate.html#cmdoption-gdal_translate-outsize"><code
class="xref std std-option docutils literal notranslate"><span
class="pre">-outsize</span></code></a> and <a
class="reference internal"
href="https://gdal.org/programs/gdal_translate.html#cmdoption-gdal_translate-a_ullr"><code
class="xref std std-option docutils literal notranslate"><span
class="pre">-a_ullr</span></code></a>.</font></p>
</dd>
</dl>
<p>and then choose among these resampling methods:</p>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-gdal_translate-r">
<span id="cmdoption-gdal-translate-r"></span><font
face="monospace"><span class="sig-name descname"><span
class="pre">-r</span></span><span class="sig-prename
descclassname"> <span class="pre">{nearest</span> <span
class="pre">(default),bilinear,cubic,cubicspline,lanczos,average,rms,mode}</span></span><a
class="headerlink"
href="https://gdal.org/programs/gdal_translate.html#cmdoption-gdal_translate-r"
title="Permalink to this definition"></a></font></dt>
<dd>
<p><font face="monospace">Select a resampling algorithm.</font></p>
<font face="monospace">
</font>
<p><code class="docutils literal notranslate"><span class="pre">nearest</span></code><font
face="monospace"> applies a nearest neighbour (simple
sampling) resampler</font></p>
<font face="monospace">
</font>
<p><code class="docutils literal notranslate"><span class="pre">average</span></code><font
face="monospace"> computes the average of all non-NODATA
contributing pixels. Starting with GDAL 3.1, this is a
weighted average taking into account properly the weight of
source pixels not contributing fully to the target pixel.</font></p>
<font face="monospace">
</font>
<p><code class="docutils literal notranslate"><span class="pre">rms</span></code><font
face="monospace"> computes the root mean squared / quadratic
mean of all non-NODATA contributing pixels (GDAL >= 3.3)</font></p>
<font face="monospace">
</font>
<p><code class="docutils literal notranslate"><span class="pre">bilinear</span></code><font
face="monospace"> applies a bilinear convolution kernel.</font></p>
<font face="monospace">
</font>
<p><code class="docutils literal notranslate"><span class="pre">cubic</span></code><font
face="monospace"> applies a cubic convolution kernel.</font></p>
<font face="monospace">
</font>
<p><code class="docutils literal notranslate"><span class="pre">cubicspline</span></code><font
face="monospace"> applies a B-Spline convolution kernel.</font></p>
<font face="monospace">
</font>
<p><code class="docutils literal notranslate"><span class="pre">lanczos</span></code><font
face="monospace"> applies a Lanczos windowed sinc
convolution kernel.</font></p>
<font face="monospace">
</font>
<p><code class="docutils literal notranslate"><span class="pre">mode</span></code><font
face="monospace"> selects the value which appears most often
of all the sampled points.</font></p>
</dd>
</dl>
<p><br>
</p>
<p>See: <a class="moz-txt-link-freetext" href="https://gdal.org/programs/gdal_translate.html">https://gdal.org/programs/gdal_translate.html</a> for the full
set of options.</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CAKrv22w0XDuVQdoyMuwvcqiZsVUBPnmpCNgB9A3r3Kcbsybk8A@mail.gmail.com">
<div dir="ltr">2. When generalizing the NDVI image to 1 square
meter per pixel, what value does that new pixel take? the mean
value of all pixels in 1 square meter? the maximum value of the
pixels? etc, I ask this because if the original NDVI image has a
pixel of 4 centimeters (16 cm2), in 1 square meter there are
more or less 625 pixels, then what pixel value does it take if
it is generalized to 1 square meter? the average? the maximum
value?<br>
<br>
<br>
Thank you very much<br>
<br>
Carlos<br>
<br>
<br>
<img class="mailtrack-img" alt="" style="display:flex"
src="https://mailtrack.io/trace/mail/87f44f39e19629a4ed0b4f4263ccb652f5f5749c.png?u=5566904"
moz-do-not-send="true" width="0" height="0"></div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918</pre>
</body>
</html>