[GRASS-user] creating high-resolution DMT

Benjamin Ducke benducke at fastmail.fm
Sat Apr 15 04:42:57 PDT 2017

On 15/04/17 05:31, Vaclav Petras wrote:
> Back to filling holes in lidar data, I also think that the "fill in the
> gaps" approach is quite promising, so I ported the r.fill.gaps module to G7:

Great! I have read the diff and that was very
helpful for me. I can see that the old and
new raster APIs have only minimal differences.
Porting seems very straight-forward.

I hope that r.fill.gaps will be useful for others.
I did not have LiDAR in mind when I wrote it,
but now it seems so obvious that LiDAR processing
is an important domain of application for the module.



> https://grass.osgeo.org/grass72/manuals/addons/r.fill.gaps.html
> I didn't review the code, but the documentation is very nice and
> detailed. I did some mostly formatting updates for the current
> submitting guidelines and added complete example with lidar data.
> On Tue, Mar 21, 2017 at 7:29 AM, Benjamin Ducke <benducke at fastmail.fm
> <mailto:benducke at fastmail.fm>> wrote:
>     I just realized that I have never committed "r.fill.gaps"
>     to the add-ins repo.
> Really nice module, please, find more of these in your shelf :-)
> Thanks!
> Vaclav
>     I have just done that now:
>     http://grasswiki.osgeo.org/wiki/AddOns/GRASS_6#r.fill.gaps
>     <http://grasswiki.osgeo.org/wiki/AddOns/GRASS_6#r.fill.gaps>
>     Its purpose is filling small gaps in otherwise dense
>     data using IDW with a pre-computed weights matrix.
>     It works on rasterized data, so you simply use v.to.rast
>     on your vector points first. Make sure to set the
>     cell size small enough so that you don't get many
>     vector points falling into the same cell. The result
>     will be an oversampled raster with a lot of small
>     "no data" cells. That's exactly the intended input for
>     r.fill.gaps!
>     This is not multi-core code, (parallelizing
>     interpolation algorithms is hard, because you need to
>     segment the data and then you need to deal with the
>     seams between the segments), but it is very, very fast,
>     as long as you keep the IDW radius small.
>     The code is optimized to death, which makes it very
>     hard to read. Another drawback is that it was written
>     for GRASS 6 (but converting it to GRASS 7 should not
>     be hard, since it uses only the basic raster API).
>     r.fill.gaps is not useful for filling large gaps, both
>     in terms of performance (for large IDW radii) and
>     interpolation quality (it's IDW -- enough said).

Dr. Benjamin Ducke
{*} Geospatial Consultant
{*} GIS Developer

Spatial technology for the masses, not the classes:
experience free and open source GIS at http://gvsigce.org

More information about the grass-user mailing list