<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Thank you very much Even. I will try it then and confirm our understanding!<br><br>With best regards.<br>~Belaid Moa.<br><br>> Date: Sun, 30 Aug 2009 22:29:33 +0200<br>> From: even.rouault@mines-paris.org<br>> To: belaid_moa@hotmail.com<br>> CC: even.rouault@mines-paris.org; gdal-dev@lists.osgeo.org<br>> Subject: RE: [gdal-dev] VRT KernelFilteredSource and NoDataValue<br>> <br>> Selon Belaid MOA <belaid_moa@hotmail.com>:<br>> <br>> ><br>> > As always, thank you very ... very much Even. Just to make sure I understood<br>> > your reply correctly,<br>> > I do the following to set the source_0 and the nodatavalue (passed as<br>> > argument)<br>> > after creating the XML for the VRTKernelFilteredSource and set it in the<br>> > papszMetadata array.<br>> > The poBand is the RasterBand I get from the VRT dataset.<br>> ><br>> > poBand->SetNoDataValue(noDataValue);<br>> > poBand->SetMetadata( papszMetadata, "vrt_sources" );<br>> ><br>> > Is this right place to set the NoDataValue of the VRTRasterBand?<br>> ><br>> > For the normalization effect (normalized=1), does it mean that:<br>> > 1- The no data value pixels are ignored AND<br>> > 2- The coefficients of valid pixels only are adjusted so that their sum is<br>> > equal to 1?<br>> <br>> Yes, correct. Well, that's my understanding of the code : no warranty expressed<br>> or implied ;-) I guess you just have now to try<br>> <br>> > If this is the case, then it is exactly the behavior I want!<br>> ><br>> > With best regards.<br>> > ~Belaid.<br>> ><br>> > > Date: Sun, 30 Aug 2009 10:12:04 +0200<br>> > > From: even.rouault@mines-paris.org<br>> > > To: belaid_moa@hotmail.com<br>> > > CC: gdal-dev@lists.osgeo.org<br>> > > Subject: Re: [gdal-dev] VRT KernelFilteredSource and NoDataValue<br>> > ><br>> > > Selon Belaid MOA <belaid_moa@hotmail.com>:<br>> > ><br>> > > Belaid,<br>> > ><br>> > > First, the VRTKernelFilteredSource will only recognize the nodata value if<br>> > you<br>> > > set it on the VRTRasterBand (it will not fetch it directly from the<br>> > > <SourceFilename>)<br>> > ><br>> > > When a nodata value is set and found in one of the values in a NxN square,<br>> > the<br>> > > value will be ignored. The effect of this depends whether normalized="1" is<br>> > set<br>> > > on <Kernel> or not. If normalized=1, the sum of the coefficients is not<br>> > > incremented for that nodata value, so the normalization will operate only<br>> > on<br>> > > valid pixel values. If normalized=0, the nodata value is just ignored<br>> > ><br>> > > As far as what happens in the borders is concerned, the code says that :<br>> > "Fill<br>> > > in missing areas. Note that we replicate the edge valid values out. We<br>> > don't<br>> > > using "mirroring" which might be more suitable for some times of filters.<br>> > We<br>> > > also don't mark these pixels as "nodata" though perhaps we should."<br>> > ><br>> > > Best regards,<br>> > ><br>> > > Even<br>> > ><br>> > > ><br>> > > > Hi everyone,<br>> > > > I am using VRT KernelFilteredSource to implement an average filter as<br>> > > > done in the VRT tutorial. However, I am still unclear on how it handles<br>> > the<br>> > > > NoDataValue pixels. Are they too averaged or does it leave them as they<br>> > are?<br>> > > > If they are masked, does do an adjustment for the kernel coefficients to<br>> > > > compensate for their absence? Another related question, is how does it<br>> > handle<br>> > > > the pixels on the borders and the kernel coefficients for those pixels?<br>> > > ><br>> > > > Thank you very very much in advance for any help on these issues.<br>> > > ><br>> > > > With best regards.<br>> > > > ~Belaid.<br>> > > ><br>> > > > _________________________________________________________________<br>> > > > Stay on top of things, check email from other accounts!<br>> > > > http://go.microsoft.com/?linkid=9671355<br>> > ><br>> > ><br>> ><br>> > _________________________________________________________________<br>> > Click less, chat more: Messenger on MSN.ca<br>> > http://go.microsoft.com/?linkid=9677404<br>> <br>> <br><br /><hr />Click less, mail more: Hotmail on the new <a href='http://go.microsoft.com/?linkid=9677402' target='_new'>MSN homepage!</a></body>
</html>