Saâd,<br><br>I too got errors.<br>The only way to avoid them for now it to run the individual rasters through their own filter vrt files.<br><br>I am going to dig deeper in the ticket #4616.<br><a href="http://trac.osgeo.org/gdal/ticket/4616">http://trac.osgeo.org/gdal/ticket/4616</a><br>
<br><div class="gmail_quote">On Fri, Apr 13, 2012 at 5:39 PM, Saâd HESSANE <span dir="ltr">&lt;<a href="mailto:saad.hessane@gmail.com">saad.hessane@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hy list,<br><br>Has anyone reproduce the bug?<br><br>Thank you.<div class="HOEnZb"><div class="h5"><br><br><br><br><div class="gmail_quote">2012/4/12 Saâd HESSANE <span dir="ltr">&lt;<a href="mailto:saad.hessane@gmail.com" target="_blank">saad.hessane@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Yes of course :</div>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote"></blockquote>
<div><span></span>
<div><div>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">&lt;VRTDataset rasterXSize=&quot;52436&quot; rasterYSize=&quot;32400&quot;&gt;<br>  &lt;SRS&gt;...&lt;/SRS&gt;<br>


  &lt;GeoTransform&gt;...&lt;/GeoTransform&gt;<br>  &lt;VRTRasterBand dataType=&quot;UInt16&quot; band=&quot;1&quot;&gt;<br>    &lt;NoDataValue&gt;0&lt;/NoDataValue&gt;<br>    &lt;ColorInterp&gt;Gray&lt;/ColorInterp&gt;<br>


    &lt;KernelFilteredSource&gt;<br>      &lt;SourceFilename relativeToVRT=&quot;1&quot;&gt;1.tif&lt;/SourceFilename&gt;<br>      &lt;SourceBand&gt;1&lt;/SourceBand&gt;<br>      &lt;SourceProperties RasterXSize=&quot;8449&quot; RasterYSize=&quot;6429&quot; DataType=&quot;UInt16&quot; BlockXSize=&quot;8449&quot; BlockYSize=&quot;1&quot; /&gt;<br>


      &lt;SrcRect xOff=&quot;0&quot; yOff=&quot;0&quot; xSize=&quot;8449&quot; ySize=&quot;6429&quot; /&gt;<br>      &lt;DstRect xOff=&quot;0&quot; yOff=&quot;0&quot; xSize=&quot;10721&quot; ySize=&quot;8158&quot; /&gt;<br>


      &lt;NODATA&gt;0&lt;/NODATA&gt;<br>    &lt;/KernelFilteredSource&gt;<br>    &lt;KernelFilteredSource&gt;<br>      &lt;SourceFilename relativeToVRT=&quot;1&quot;&gt;2.tif&lt;/SourceFilename&gt;<br>      &lt;SourceBand&gt;1&lt;/SourceBand&gt;<br>


      &lt;SourceProperties RasterXSize=&quot;8772&quot; RasterYSize=&quot;6407&quot; DataType=&quot;UInt16&quot; BlockXSize=&quot;8772&quot; BlockYSize=&quot;1&quot; /&gt;<br>      &lt;SrcRect xOff=&quot;0&quot; yOff=&quot;0&quot; xSize=&quot;8772&quot; ySize=&quot;6407&quot; /&gt;<br>


      &lt;DstRect xOff=&quot;43664&quot; yOff=&quot;25993&quot; xSize=&quot;8772&quot; ySize=&quot;6407&quot; /&gt;<br>      &lt;NODATA&gt;0&lt;/NODATA&gt;<br>    &lt;/KernelFilteredSource&gt;<br>  &lt;/VRTRasterBand&gt;<br>


&lt;/VRTDataset&gt;</blockquote>
<div> </div>
</div><div>It&#39;s really simple to reproduce the problem : do a &quot;buildvrt&quot; on a set of raster ( &gt; 1 raster ). Edit the vrt file and rename &quot;ComplexSource&quot; tag with &quot;KernelFilteredSource&quot;. add if you want the kernel definition.</div>



<div>Now you can do a gdal_translate to write a tiff file.</div>
<div> </div>
<div>There&#39;s no error in the terminale.</div>
<div>gdal_translate crash and a windows error dialog appears saying that the the program has encountered an error and have to be close (the error is in frensh sorry for my bad english...).</div>
<div>I&#39;m using gdal 1.9 x64 onto Win 7 x64.</div>
<div> </div>
<div> </div></div>
<div> </div></div><div><div>
<div class="gmail_quote">2012/4/12 Chaitanya kumar CH <span dir="ltr">&lt;<a href="mailto:chaitanya.ch@gmail.com" target="_blank">chaitanya.ch@gmail.com</a>&gt;</span><br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">Saâd,<br><br>Can you provide the vrt file causing the crash? Also, please show me the error messages you got. 
<div>
<div><br><br>
<div class="gmail_quote">On Thu, Apr 12, 2012 at 7:21 PM, Saâd HESSANE <span dir="ltr">&lt;<a href="mailto:saad.hessane@gmail.com" target="_blank">saad.hessane@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div>Thank you Chaitanya for the answer,</div>
<div> </div>
<div>I do the test with the kenel element like the documentation :</div>
<div> </div>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">&lt;Kernel normalized=&quot;1&quot;&gt;<br>    &lt;Size&gt;3&lt;/Size&gt;<br>    &lt;Coefs&gt;0.11111111 0.11111111 0.11111111 0.11111111 0.11111111 0.11111111 0.11111111 0.11111111 0.11111111&lt;/Coefs&gt;<br>


&lt;/Kernel&gt;<br></blockquote>
<div>It&#39;s the same probleme, gdal_translate crash. But if the VRTRasterBand have just one KernelFilteredSource element, gdal_translate work fine and apply the filtre correctely.</div>
<div> </div>
<div>The poblem appears if there are more than one KernelFilteredSource element in the VRTRasterBand.</div>
<div>
<div>
<div> </div>
<div> </div>
<div> </div>
<div class="gmail_quote">2012/4/12 Chaitanya kumar CH <span dir="ltr">&lt;<a href="mailto:chaitanya.ch@gmail.com" target="_blank">chaitanya.ch@gmail.com</a>&gt;</span><br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">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">
<div>
<div>On Wed, Apr 11, 2012 at 3:20 PM, Saâd HESSANE <span dir="ltr">&lt;<a href="mailto:saad.hessane@gmail.com" target="_blank">saad.hessane@gmail.com</a>&gt;</span> wrote:<br></div></div>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div>
<div>Hy all,<br><br>I have a VRT file generated with buildvrt utility :<br><br>
<blockquote style="BORDER-LEFT:rgb(204,204,204) 1px solid;MARGIN:0pt 0pt 0pt 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">&lt;VRTDataset rasterXSize=&quot;52436&quot; rasterYSize=&quot;32400&quot;&gt;<br>  &lt;SRS&gt;...&lt;/SRS&gt;<br>


  &lt;GeoTransform&gt;...&lt;/GeoTransform&gt;<br>  &lt;VRTRasterBand dataType=&quot;UInt16&quot; band=&quot;1&quot;&gt;<br>    &lt;NoDataValue&gt;0&lt;/NoDataValue&gt;<br>    &lt;ColorInterp&gt;Gray&lt;/ColorInterp&gt;<br>


    &lt;ComplexSource&gt;<br>      &lt;SourceFilename relativeToVRT=&quot;1&quot;&gt;1.tif&lt;/SourceFilename&gt;<br>      &lt;SourceBand&gt;1&lt;/SourceBand&gt;<br>      &lt;SourceProperties RasterXSize=&quot;8449&quot; RasterYSize=&quot;6429&quot; DataType=&quot;UInt16&quot; BlockXSize=&quot;8449&quot; BlockYSize=&quot;1&quot; /&gt;<br>


      &lt;SrcRect xOff=&quot;0&quot; yOff=&quot;0&quot; xSize=&quot;8449&quot; ySize=&quot;6429&quot; /&gt;<br>      &lt;DstRect xOff=&quot;0&quot; yOff=&quot;0&quot; xSize=&quot;10721&quot; ySize=&quot;8158&quot; /&gt;<br>


      &lt;NODATA&gt;0&lt;/NODATA&gt;<br>    &lt;/ComplexSource&gt;<br>    &lt;ComplexSource&gt;<br>      &lt;SourceFilename relativeToVRT=&quot;1&quot;&gt;2.tif&lt;/SourceFilename&gt;<br>      &lt;SourceBand&gt;1&lt;/SourceBand&gt;<br>


      &lt;SourceProperties RasterXSize=&quot;8772&quot; RasterYSize=&quot;6407&quot; DataType=&quot;UInt16&quot; BlockXSize=&quot;8772&quot; BlockYSize=&quot;1&quot; /&gt;<br>      &lt;SrcRect xOff=&quot;0&quot; yOff=&quot;0&quot; xSize=&quot;8772&quot; ySize=&quot;6407&quot; /&gt;<br>


      &lt;DstRect xOff=&quot;43664&quot; yOff=&quot;25993&quot; xSize=&quot;8772&quot; ySize=&quot;6407&quot; /&gt;<br>      &lt;NODATA&gt;0&lt;/NODATA&gt;<br>    &lt;/ComplexSource&gt;<br>  &lt;/VRTRasterBand&gt;<br>&lt;/VRTDataset&gt;<br>


</blockquote>
<div><br>It&#39;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="BORDER-LEFT:rgb(204,204,204) 1px solid;MARGIN:0pt 0pt 0pt 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">&lt;VRTDataset rasterXSize=&quot;52436&quot; rasterYSize=&quot;32400&quot;&gt;<br>  &lt;SRS&gt;...&lt;/SRS&gt;<br>


  &lt;GeoTransform&gt;...&lt;/GeoTransform&gt;<br>  &lt;VRTRasterBand dataType=&quot;UInt16&quot; band=&quot;1&quot;&gt;<br>    &lt;NoDataValue&gt;0&lt;/NoDataValue&gt;<br>    &lt;ColorInterp&gt;Gray&lt;/ColorInterp&gt;<br>


    &lt;KernelFilteredSource&gt;<br>      &lt;SourceFilename relativeToVRT=&quot;1&quot;&gt;1.tif&lt;/SourceFilename&gt;<br>      &lt;SourceBand&gt;1&lt;/SourceBand&gt;<br>      &lt;SourceProperties RasterXSize=&quot;8449&quot; RasterYSize=&quot;6429&quot; DataType=&quot;UInt16&quot; BlockXSize=&quot;8449&quot; BlockYSize=&quot;1&quot; /&gt;<br>


      &lt;SrcRect xOff=&quot;0&quot; yOff=&quot;0&quot; xSize=&quot;8449&quot; ySize=&quot;6429&quot; /&gt;<br>      &lt;DstRect xOff=&quot;0&quot; yOff=&quot;0&quot; xSize=&quot;10721&quot; ySize=&quot;8158&quot; /&gt;<br>


      &lt;NODATA&gt;0&lt;/NODATA&gt;<br>    &lt;/KernelFilteredSource&gt;<br>    &lt;KernelFilteredSource&gt;<br>      &lt;SourceFilename relativeToVRT=&quot;1&quot;&gt;2.tif&lt;/SourceFilename&gt;<br>      &lt;SourceBand&gt;1&lt;/SourceBand&gt;<br>


      &lt;SourceProperties RasterXSize=&quot;8772&quot; RasterYSize=&quot;6407&quot; DataType=&quot;UInt16&quot; BlockXSize=&quot;8772&quot; BlockYSize=&quot;1&quot; /&gt;<br>      &lt;SrcRect xOff=&quot;0&quot; yOff=&quot;0&quot; xSize=&quot;8772&quot; ySize=&quot;6407&quot; /&gt;<br>


      &lt;DstRect xOff=&quot;43664&quot; yOff=&quot;25993&quot; xSize=&quot;8772&quot; ySize=&quot;6407&quot; /&gt;<br>      &lt;NODATA&gt;0&lt;/NODATA&gt;<br>    &lt;/KernelFilteredSource&gt;<br>  &lt;/VRTRasterBand&gt;<br>


&lt;/VRTDataset&gt;<br></blockquote>
<div><br>It&#39;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></div></div>_______________________________________________<br>


gdal-dev mailing list<br><a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">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><span><font color="#888888"><br>


</font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br><a href="tel:%2B91-9494447584" value="+919494447584" target="_blank">+91-9494447584</a><br>


17.2416N 80.1426E<br></font></span></blockquote></div><br></div></div></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br><a href="tel:%2B91-9494447584" value="+919494447584" target="_blank">+91-9494447584</a><br>


17.2416N 80.1426E<br></div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>