Le mardi 09 avril 2013 19:06:28, Etienne Tourigny a écrit : > I have committed new warping methods average and mode to trunk, this will > be part of gdal-1.10
Hi Etienne, It would be good if you could extend the autotest suite to add tests for those new warping methods. For that, you can likely take inspiration from the first tests of autotest/warp/warp.py. "Reference" images based on utmsmall.tif reference image is a bit big, but you can likely start from a smaller source image like byte.tif instead that will produce reference images of reasonable size to be put in svn. Regarding nAlgo == 2 (mode with foating point data), the allocations of pafVals and panSums have the potential to fail if warping is done on a large image whose floating point values are rarely identical. So I think that VSIRealloc shoud be used instead with a test on the result to fail properly. I'm also a bit doubtfull about the practical usefulness of this case on real data. There might also be a performance issue due to the loop "//Check array for existing entry" that is at the most inner level of the algorithm. Unless you have a practical use case, my personnal opinion would be to refuse to run mode resampling on floating point data, or implement it with a tolerance parameter to avoid strict floating point comparison (if that makes sense), but even that wouldn't guarantee reasonable performance and memory consumption. As far as mode resampling is concerned, it would likely run correctly for images with color tables, so I believe that the warning in gdalwarp.cpp at line 1048 could be shut down in that case too (in addition to nearest resampling) Best regards, Even _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
