1r3.in.xyz(1) GRASS GIS User's Manual r3.in.xyz(1)
2
3
4
6 r3.in.xyz - Create a 3D raster map from an assemblage of many coordi‐
7 nates using univariate statistics
8
10 raster3d, import, voxel, LIDAR, statistics, conversion, aggregation,
11 binning
12
14 r3.in.xyz
15 r3.in.xyz --help
16 r3.in.xyz [-sgi] input=name output=name [method=string]
17 [type=string] [separator=character] [x=integer] [y=integer]
18 [z=integer] [value_column=integer] [vrange=min,max] [vs‐
19 cale=float] [percent=integer] [pth=integer] [trim=float] [work‐
20 ers=integer] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
21
22 Flags:
23 -s
24 Scan data file for extent then exit
25
26 -g
27 In scan mode, print using shell script style
28
29 -i
30 Ignore broken lines
31
32 --overwrite
33 Allow output files to overwrite existing files
34
35 --help
36 Print usage summary
37
38 --verbose
39 Verbose module output
40
41 --quiet
42 Quiet module output
43
44 --ui
45 Force launching GUI dialog
46
47 Parameters:
48 input=name [required]
49 ASCII file containing input data
50
51 output=name [required]
52 Name for output raster map
53
54 method=string
55 Statistic to use for raster values
56 Options: n, min, max, range, sum, mean, stddev, variance, co‐
57 eff_var, median, percentile, skewness, trimmean
58 Default: mean
59
60 type=string
61 Storage type for resultant raster map
62 Options: float, double
63 Default: float
64
65 separator=character
66 Field separator
67 Special characters: pipe, comma, space, tab, newline
68 Default: pipe
69
70 x=integer
71 Column number of x coordinates in input file (first column is 1)
72 Default: 1
73
74 y=integer
75 Column number of y coordinates in input file
76 Default: 2
77
78 z=integer
79 Column number of z coordinates in input file
80 Default: 3
81
82 value_column=integer
83 Column number of data values in input file
84 If not given or set to 0, the data points’ z-values are used
85 Default: 0
86
87 vrange=min,max
88 Filter range for value column data (min,max)
89
90 vscale=float
91 Scaling factor to apply to value column data
92 Default: 1.0
93
94 percent=integer
95 Percent of map to keep in memory
96 Options: 1-100
97 Default: 100
98
99 pth=integer
100 pth percentile of the values
101 Options: 1-100
102
103 trim=float
104 Discard <trim> percent of the smallest and <trim> percent of the
105 largest observations
106 Options: 0-50
107
108 workers=integer
109 Number of parallel processes to launch
110 Options: 1-256
111 Default: 1
112
114 r3.in.xyz imports sparse XYZ data from an ASCII file into a 3D raster
115 map (voxels). It does this by running the r.in.xyz module multiple
116 times for different z-ranges and then assembling the slices with
117 r.to.rast3.
118
119 See the r.in.xyz help page for general parameter usage and tips.
120
121 The map is created using the rows, columns, and depths set by current
122 region settings. Be sure to check and adjust these with the g.region
123 module before performing the import.
124
125 You may either use the z-value as the data value for the voxel (e.g.
126 with the ’n’ statistic), or alternately scan another column for the
127 data values to bin into the voxels. This alternate data column can be
128 both filtered by range and have a scaling factor applied to it.
129
131 The 2D and 3D horizontal region resolutions must match. See the EXAM‐
132 PLES section below.
133
134 Unlike r.in.xyz, reading from stdin and z-scaling are not possible.
135 Filtering by z-range is accomplished by setting the 3D region.
136
137 To enable parallel processing support, set the workers= option to match
138 the number of CPUs or CPU-cores available on your system. Alterna‐
139 tively, the WORKERS environment variable can be set to the number of
140 concurrent processes desired.
141
142 Points falling exactly on a vertical bound will belong to the depth
143 band below them, except for points exactly on the top bound, which will
144 belong to the top-most slice.
145
146 The script is expected to be nearly as efficient as if it was fully
147 written in C.
148
150 Using the Serpent Mound dataset. (see the GRASS LiDAR wiki page)
151 #scan dataset for extent:
152 r3.in.xyz -s in=Serpent_Mound_Model_LAS_Data.txt out=dummy \
153 x=1 y=2 z=3 separator=space
154 # set the 2D and 3D regions:
155 g.region n=4323641.57 s=4320942.61 w=289020.90 e=290106.02 res=1 -a
156 g.region b=166 t=216 res3=1 tbres=5 -3 -p
157 r3.in.xyz in=Serpent_Mound_Model_LAS_Data.txt out=serpent3D \
158 method=mean x=1 y=2 z=3 separator=space type=float
159 The same, but aggregate and store backscatter strength from column 5
160 into voxels in instead of the z-value:
161 r3.in.xyz in=Serpent_Mound_Model_LAS_Data.txt out=serpent3D.bakscat \
162 method=mean x=1 y=2 z=3 val=5 separator=space type=float
163
165 r.to.rast3 always creates a double output map regardless of input.
166
168 g.region, r.in.xyz, r.to.rast3
169
171 Hamish Bowman
172 Dunedin, New Zealand
173
175 Available at: r3.in.xyz source code (history)
176
177 Accessed: Saturday Jan 21 21:17:03 2023
178
179 Main index | 3D raster index | Topics index | Keywords index | Graphi‐
180 cal index | Full index
181
182 © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
183
184
185
186GRASS 8.2.1 r3.in.xyz(1)