[Gdal-dev] VRTKernelFilteredSource and nodata

Asger Sigurd Petersen ASP at blominfo.dk
Wed Aug 8 11:36:52 EDT 2007


> The original client who funded the VRTKernelFilteredSource work didn't care
> about nodata values, so I didn't address it at the time.  But I agree it is
> desirable that it should be supported.  If you prepare patches, please file
> the changes as a ticket in Trac.  If you don't, it would still be helpful
> for you to file the issue in Trac with details from your earlier email.

I have filed a ticket (http://trac.osgeo.org/gdal/ticket/1739) with my version of vrtfilters.cpp attached as I didn't manage to make a real patch.

Another thing I mentioned in my previous mail was that I find the attribute "normalized" on the kernel counter intuitive. From the name of the attribute and from the documentation I would expect the attribute to say something about the state of the given kernel but it doesn't. Actually it determines if the kernel is normalized during the later processing. So, if you have a kernel that you know is normalized or you don't want to be normalized, you should set "normalized" to false. Otherwise it will be re-normalized for every output pixel. On the other hand, if you kernel is not normalized on input and you want it to be normalized during the processing, you should set normalized to true.

The way the code works now, I think a more appropriate name for the attribute would be "normalize". You could of course change the code to normalize kernels which have "normalized" set to false, but this is probably not what one would expect either.

Best regards
Asger




More information about the Gdal-dev mailing list