Bladeren bron

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

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68326 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 9 jaren geleden
bovenliggende
commit
a23d648625
1 gewijzigde bestanden met toevoegingen van 16 en 2 verwijderingen
  1. 16 2
      raster/r.in.xyz/r.in.xyz.html

+ 16 - 2
raster/r.in.xyz/r.in.xyz.html

@@ -208,20 +208,34 @@ number of points per grid cell), the z values are ignored anyway.
 
 Sometimes elevation data are delivered as x,y,z ASCII files instead of
 a raster matrix:
+
+<!-- NC: preparation for this example
+g.region raster=elevation res=15 -p 
+# 
+r.stats -1g elevation > elevation.xyz
+-->
+
 <div class="code"><pre>
+# Important: observe the raster spacing from the ASCII file:
 # 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
 # ...
+# The point distance is 15m here.
 
 # 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
+# set computational region, along with the actual raster resolution
+# which is defined by the ASCII file point spacing:
+g.region n=228492.5 s=215007.5 e=644992.5 w=630007.5 res=15 -p
+
+# enlarge computational region by half a raster cell (here 7.5m) to
+# store the points as cell centers:
+g.region n=n+7.5 s=s-7.5 w=w-7.5 e=e+7.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