Saâd,<br><br>There should be a Kernel element in a KernelFilteredSource.<br>FYI, all the pixels whose kernel has a nodata pixel will be reported as a nodata pixel.<br><br><div class="gmail_quote">On Wed, Apr 11, 2012 at 3:20 PM, Saâd HESSANE <span dir="ltr"><<a href="mailto:saad.hessane@gmail.com">saad.hessane@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hy all,<br><br>I have a VRT file generated with buildvrt utility :<br><br><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
<VRTDataset rasterXSize="52436" rasterYSize="32400"><br>
<SRS>...</SRS><br> <GeoTransform>...</GeoTransform><br> <VRTRasterBand dataType="UInt16" band="1"><br> <NoDataValue>0</NoDataValue><br> <ColorInterp>Gray</ColorInterp><br>
<ComplexSource><br> <SourceFilename relativeToVRT="1">1.tif</SourceFilename><br> <SourceBand>1</SourceBand><br> <SourceProperties RasterXSize="8449" RasterYSize="6429" DataType="UInt16" BlockXSize="8449" BlockYSize="1" /><br>
<SrcRect xOff="0" yOff="0" xSize="8449" ySize="6429" /><br> <DstRect xOff="0" yOff="0" xSize="10721" ySize="8158" /><br>
<NODATA>0</NODATA><br> </ComplexSource><br> <ComplexSource><br> <SourceFilename relativeToVRT="1">2.tif</SourceFilename><br> <SourceBand>1</SourceBand><br>
<SourceProperties RasterXSize="8772" RasterYSize="6407" DataType="UInt16" BlockXSize="8772" BlockYSize="1" /><br> <SrcRect xOff="0" yOff="0" xSize="8772" ySize="6407" /><br>
<DstRect xOff="43664" yOff="25993" xSize="8772" ySize="6407" /><br> <NODATA>0</NODATA><br> </ComplexSource><br> </VRTRasterBand><br></VRTDataset><br>
</blockquote><div><br>It's work fine with a gdal_translate.<br>Now I want to apply a filter kernel to the VRT. I have to use the KernelFilteredSource.<br>The gdal api say that VRTKernelFilteredSource is a sub-class of VRTComplexSource. So a VRTKernelFilteredSource <b>is </b>a VRTComplexSource.<br>
But if I replace VRTComplexSource by VRTKernelFilteredSource, gdal_translate crash. This is the new VRT :<br><br><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
<VRTDataset rasterXSize="52436" rasterYSize="32400"><br> <SRS>...</SRS><br> <GeoTransform>...</GeoTransform><br> <VRTRasterBand dataType="UInt16" band="1"><br>
<NoDataValue>0</NoDataValue><br> <ColorInterp>Gray</ColorInterp><br> <KernelFilteredSource><br> <SourceFilename relativeToVRT="1">1.tif</SourceFilename><br>
<SourceBand>1</SourceBand><br> <SourceProperties RasterXSize="8449" RasterYSize="6429" DataType="UInt16" BlockXSize="8449" BlockYSize="1" /><br>
<SrcRect xOff="0" yOff="0" xSize="8449" ySize="6429" /><br> <DstRect xOff="0" yOff="0" xSize="10721" ySize="8158" /><br>
<NODATA>0</NODATA><br> </KernelFilteredSource><br> <KernelFilteredSource><br> <SourceFilename relativeToVRT="1">2.tif</SourceFilename><br> <SourceBand>1</SourceBand><br>
<SourceProperties RasterXSize="8772" RasterYSize="6407" DataType="UInt16" BlockXSize="8772" BlockYSize="1" /><br> <SrcRect xOff="0" yOff="0" xSize="8772" ySize="6407" /><br>
<DstRect xOff="43664" yOff="25993" xSize="8772" ySize="6407" /><br> <NODATA>0</NODATA><br> </KernelFilteredSource><br> </VRTRasterBand><br>
</VRTDataset><br></blockquote><div><br>It's weird, I expected a polymorphism between VRTComplexSource and VRTKernelFilteredSource.<br>So the question : how can I apply a filter to a VRT?<br>Thank you !<br></div>
</div><br>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>
<br>+91-9494447584<br>17.2416N 80.1426E<br>