[gdal-dev] downsampling geotiff with a low-pass filter

Kay F. Jahnke _kfj at yahoo.com
Wed Nov 21 02:58:27 PST 2018


On 16.11.18 17:04, Markus Neteler wrote:
> 
> There are plenty of different kernel smoothers in GRASS GIS, e.g.
> 
> box, bartlett, gauss, normal, hermite, sinc, lanczos1, lanczos2,
> lanczos3, hann, hamming, blackman
> https://grass.osgeo.org/grass76/manuals/r.resamp.filter.html
> 
> Using "grass-session" (https://github.com/zarch/grass-session) you can
> use the functionality in Python also from "outside" without even
> knowing much about GRASS GIS itself.

Thank you for your reply! I tried out using a gauss filter via 
r.resamp.filter, and the result is just as usable as the one I got with 
my previous attempt, using Jake's python script. I think I prefer to 
stick with the direct python approach, rather, because I find all the 
extra work of having to set up the right grass location and mapset, the 
importing and exporting and work in the grass console window too much of 
a bother, when I can simply call the filter script on the command line. 
I'll have a look at grass-session when I get around to it, maybe that 
makes it easier.

The grass process performed as intended, read the VRT file correctly and 
did properly cut off the 'grey area' where the valid data bordered on 
no-data values, so I think if a user is comfortable with GRASS this is 
just as good a way to receive a smoothed data set before resampling.

Kay


More information about the gdal-dev mailing list