[gdal-dev] Call for discussion on RFC 51: RasterIO() improvements : resampling and progress callback
even.rouault at spatialys.com
Tue Nov 25 02:47:20 PST 2014
The gaussian resampling is the one already available for gdaladdo, that was
- for a downscaling of factor between 1 and 2 (and for upscaling as well), it
will use a 3x3 kernel
- for a downscaling of factor between 2 and 4, it will use a 5x5 kernel
- beyond it will use a 7x7 kernel.
I understand that gaussian blur can/could be parametrized in more complex
ways. If there are improvements in that area, additional parameters could
likely be passed through the GDALRasterIOExtraArg structure.
I've also wondered if the resampling algorithm couldn't be specified as a
string instead of an enumerated value. In which case you could have had things
like "gauss_x_y" with x and y as parameters. I don't have strong preference
for one way or the other one. And both already exist in GDAL : the GDAL
warping API uses an enumerated value, the GDAL overview API uses a string...
> On 25 November 2014 at 05:34, Even Rouault <even.rouault at spatialys.com>
> >> Otherwise I have not much to say about this RFC. "Blurring" has two r's,
> > Fixed
> Gaussian blur also has another complexity, since it's output
> dimensions depend on the fftconvolve mode (using scipy.signal docs
> For example, to "blur" a DTM and maintain the same output dimensions
> and geotransform, the mode would need to use a 'valid' convolution
> with a padded input array. This padded array would also have a mode
> (similarly from numpy docs
> such as 'symmetric'.
> Someone else may want to blur a DTM without using a padded array, and
> just return a smaller array with modified geotransform.
> And a different "blur" would expand the output dimension and modify
> the geotransform using a 'full' fftconvolve mode, using a 'constant'=0
> padded array. An example of this is to "blur" a polygon that barely
> extends to the shape's extent, but maintain the blur beyond the
> initial extent. The constant value would also need to be supplied, as
> a value of 0 for numpy is default.
> So in summary, I'm not sure how GDAL could best cover all combinations
> of padding and convolution modes, except to offer a few prepared
> use-cases, or somehow provide extra parameters. Or just provide a
> single use case, similar to Gaussian blur routines in various raster
> editing software.
Spatialys - Geospatial professional services
More information about the gdal-dev