[GRASS-SVN] r73196 - grass/branches/releasebranch_7_4/scripts/r.fillnulls

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 27 09:33:08 PDT 2018


Author: neteler
Date: 2018-08-27 09:33:07 -0700 (Mon, 27 Aug 2018)
New Revision: 73196

Modified:
   grass/branches/releasebranch_7_4/scripts/r.fillnulls/r.fillnulls.html
Log:
r.fillnulls manual: example extended with bilinear method

Modified: grass/branches/releasebranch_7_4/scripts/r.fillnulls/r.fillnulls.html
===================================================================
--- grass/branches/releasebranch_7_4/scripts/r.fillnulls/r.fillnulls.html	2018-08-27 16:32:33 UTC (rev 73195)
+++ grass/branches/releasebranch_7_4/scripts/r.fillnulls/r.fillnulls.html	2018-08-27 16:33:07 UTC (rev 73196)
@@ -69,13 +69,32 @@
 g.region raster=elev_srtm_30m -p
 d.mon wx0
 d.histogram elev_srtm_30m
-# remove too low elevations (esp. lakes)
-r.mapcalc "elev_srtm_30m_filt = if(elev_srtm_30m < 50.0, null(), elev_srtm_30m)"
+
+# remove SRTM outliers, i.e. SRTM below 50m (esp. lakes), leading to no data areas
+r.mapcalc "elev_srtm_30m_filt = if(elev_srtm_30m < 50.0, null(), elev_srtm_30m)"
 d.histogram elev_srtm_30m_filt
 d.rast elev_srtm_30m_filt
-r.fillnulls input=elev_srtm_30m_filt output=elev_srtm_30m_complete tension=20
-d.histogram elev_srtm_30m_complete
-d.rast elev_srtm_30m_complete
+
+# using the default RST method to fill these holes in DEM
+r.fillnulls input=elev_srtm_30m_filt output=elev_srtm_30m_rst tension=20
+
+# using the bilinear method to fill these holes in DEM
+r.fillnulls input=elev_srtm_30m_filt output=elev_srtm_30m_bilin method=bilinear
+
+d.histogram elev_srtm_30m_rst
+d.rast elev_srtm_30m_rst
+
+d.erase
+d.histogram elev_srtm_30m_bilin
+d.rast elev_srtm_30m_bilin
+
+r.mapcalc "diff_rst_bilin = elev_srtm_30m_rst - elev_srtm_30m_bilin"
+r.colors diff_rst_bilin color=differences
+
+r.univar -e diff_rst_bilin
+d.erase
+d.rast diff_rst_bilin
+d.legend diff_rst_bilin
 </pre></div>
 
 <h2>REFERENCES</h2>



More information about the grass-commit mailing list