<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;}
@font-face
        {font-family:"Source Sans Pro";
        panose-1:2 11 5 3 3 4 3 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
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="en-SE" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="SV">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">I have a question about resampling using gdal.warp from Python.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">I'm doing a bilinear resampling
</span><span lang="EN-US" style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">of the bands of a Sentinel 2 image
</span><span style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">to match
</span><span lang="EN-US" style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">resolutions between bands. M</span><span style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">y
 question is if </span><span lang="EN-US" style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">using
</span><span style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">bilinear</span><span lang="EN-US" style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white"> sampling
</span><span style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">will include noData</span><span style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">
<span lang="EN-US">value</span></span><span style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white"> in the resampling calculation?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">Looking at the
</span><span lang="EN-US" style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">documented
</span><span style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">available resampling methods, only near, bilinear, cubic, cubicspline, lanczos do not mention only using non-NODATA in their description.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">Ideally nodata is nodata and should not be part of the calculation. But is this perhaps not possible for these calculations?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">In the GDAL chat someone suggested creating a validity mask, resampling it to the correct resolution and then using it for
 filtering results, but that would perhaps not either give the correct results if noData is included in the calculation.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.5pt;font-family:"Source Sans Pro",sans-serif;color:#22231F;background:white">Kind regards, Edward Hiscoke<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<span style="font-size: 9px; line-height: 10px;">This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.</span></body>
</html>