浏览代码

r.in.xyz manual: example for x,y,z ASCII file import

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68309 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 9 年之前
父节点
当前提交
435599d8b7
共有 1 个文件被更改,包括 28 次插入1 次删除
  1. 28 1
      raster/r.in.xyz/r.in.xyz.html

+ 28 - 1
raster/r.in.xyz/r.in.xyz.html

@@ -202,8 +202,35 @@ attribute(s), the data can be imported using either the x or y
 coordinate as a fake z column for <b>method</b>=<tt>n</tt> (count 
 number of points per grid cell), the z values are ignored anyway.
 
-<h2>EXAMPLE</h2>
+<h2>EXAMPLES</h2>
 
+<h3>Import of x,y,z ASCII into DEM</h3>
+
+Sometimes elevation data are delivered as x,y,z ASCII files instead of
+a raster matrix:
+<div class="code"><pre>
+# ASCII file format (example):
+# 630007.5 228492.5 141.99614
+# 630022.5 228492.5 141.37904
+# 630037.5 228492.5 142.29822
+# 630052.5 228492.5 143.97987
+# ...
+
+# detect extent, print result as g.region parameters
+r.in.xyz input=elevation.xyz separator=space -s output=dummy -g
+# ... n=228492.5 s=215007.5 e=644992.5 w=630007.5 b=55.578793 t=156.32986
+
+# set computational region
+g.region n=228492.5 s=215007.5 e=644992.5 w=630007.5 -p
+
+# import XYZ ASCII file, with z values as raster cell values
+r.in.xyz input=elevation.xyz separator=space method=mean output=myelev
+
+# univariate statistics for verification of raster values
+r.univar myelev
+</pre></div>
+
+<h3>Import of LiDAR data and DEM creation</h3>
 Import the <a href="http://www.grassbook.org/ncexternal/index.html">Jockey's
 Ridge, NC, LIDAR dataset</a> (compressed file "lidaratm2.txt.gz"), and process it
 into a clean DEM: