浏览代码

r.fillnulls manual: example extended with bilinar method

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73195 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 6 年之前
父节点
当前提交
38fe35d090
共有 1 个文件被更改,包括 24 次插入5 次删除
  1. 24 5
      scripts/r.fillnulls/r.fillnulls.html

+ 24 - 5
scripts/r.fillnulls/r.fillnulls.html

@@ -69,13 +69,32 @@ a complete elevation map:
 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>