Ken,<br><br>The current kernel filter does not ignore the boundaries of nodata pixels. But it does normalize the kernel after ignoring the nodata pixels in the kernel, if the 'normalized' attribute is set to 1.<br>
<br>You can raise a ticket to request for this feature at <a href="http://trac.osgeo.org/gdal/newticket">http://trac.osgeo.org/gdal/newticket</a><br><br><br><div class="gmail_quote">On Thu, Nov 18, 2010 at 6:08 AM, Boss, Ken (DNR) <span dir="ltr"><<a href="mailto:Ken.Boss@state.mn.us" target="_blank">Ken.Boss@state.mn.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello list--<br>
<br>
I am attempting to filter a raster using gdal_translate (v 1.7) and a vrt with a KernelFilteredSource. The input raster contains large areas of "nodata" values. I would like the filter to ignore those areas. I have tried various combinations of <NoDataValue>, <HideNoDataValue>, <NODATA> and <Kernel normalized='1'>, but have not been able to prevent the filter from applying itself at data/nodata boundaries.<br>
<br>
My current VRT and gdal_translate command lines are below. Can anyone tell me what I am doing wrong?<br>
<br>
Thanks,<br>
<br>
Ken Boss<br>
Minnesota DNR<br>
<br>
===== kernel_filter.vrt ===================<br>
<br>
<VRTDataset rasterYSize='690' rasterXSize='575'><br>
<SRS>EPSG:26915</SRS><br>
<GeoTransform>190000, 1000, 0, 4795000, 0, 1000</GeoTransform><br>
<VRTRasterBand band='1' dataType='Byte'><br>
<KernelFilteredSource><br>
<SourceFilename>interpolated.tif</SourceFilename><br>
<SourceBand>1</SourceBand><br>
<NoDataValue>255</NoDataValue><br>
<HideNoDataValue>1</HideNoDataValue><br>
<Kernel normalized='1'><br>
<Size>5</Size><br>
<Coefs>0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04 0.04</Coefs><br>
</Kernel><br>
</KernelFilteredSource><br>
</VRTRasterBand><br>
</VRTDataset><br>
<br>
=====================================<br>
<br>
gdal_translate -of GTiff -ot Byte -a_srs EPSG:26915 kernel_filter.vrt kernel_filtered.tif<br>
<br>
_______________________________________________<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><br>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>