1r3.in.lidar(1) Grass User's Manual r3.in.lidar(1)
2
3
4
6 r3.in.lidar - Creates a 3D raster map from LAS LiDAR points using uni‐
7 variate statistics.
8
10 raster3d, import, LIDAR, statistics, conversion, aggregation, binning
11
13 r3.in.lidar
14 r3.in.lidar --help
15 r3.in.lidar [-dvopsg] [input=name] [file=name] [n=name]
16 [sum=name] [mean=name] [proportional_n=name] [propor‐
17 tional_sum=name] [return_filter=string] [class_filter=inte‐
18 ger[,integer,...]] [base_raster=name] [zscale=float] [inten‐
19 sity_range=min,max] [intensity_scale=float] [--overwrite] [--help]
20 [--verbose] [--quiet] [--ui]
21
22 Flags:
23 -d
24 Use base raster actual resolution instead of computational region
25
26 -v
27 Use only valid points
28 Points invalid according to APSRS LAS specification will be fil‐
29 tered out
30
31 -o
32 Override projection check (use current location’s projection)
33 Assume that the dataset has same projection as the current location
34
35 -p
36 Print LAS file info and exit
37
38 -s
39 Scan data file for extent then exit
40
41 -g
42 In scan mode, print using shell script style
43
44 --overwrite
45 Allow output files to overwrite existing files
46
47 --help
48 Print usage summary
49
50 --verbose
51 Verbose module output
52
53 --quiet
54 Quiet module output
55
56 --ui
57 Force launching GUI dialog
58
59 Parameters:
60 input=name
61 LAS input file
62 LiDAR input file in LAS format (*.las or *.laz)
63
64 file=name
65 File containing names of LAS input files
66 LiDAR input files in LAS format (*.las or *.laz)
67
68 n=name
69 Count of points per cell
70 Name for output 3D raster map
71
72 sum=name
73 Sum of values of point intensities per cell
74 Name for output 3D raster map
75
76 mean=name
77 Mean of point intensities per cell
78 Name for output 3D raster map
79
80 proportional_n=name
81 3D raster map of proportional point count
82 Point count per 3D cell divided by point count per vertical column
83
84 proportional_sum=name
85 3D raster map of proportional sum of values
86 Sum of values per 3D cell divided by sum of values per vertical
87 column
88
89 return_filter=string
90 Only import points of selected return type
91 If not specified, all points are imported
92 Options: first, last, mid
93
94 class_filter=integer[,integer,...]
95 Only import points of selected class(es)
96 Input is comma separated integers. If not specified, all points are
97 imported.
98
99 base_raster=name
100 Subtract raster values from the z coordinates
101 The scale for z is applied beforehand, the filter afterwards
102
103 zscale=float
104 Scale to apply to Z data
105 Default: 1.0
106
107 intensity_range=min,max
108 Filter range for intensity values (min,max)
109
110 intensity_scale=float
111 Scale to apply to intensity values
112 Default: 1.0
113
115 The r.in.lidar module is very similar to the r3.in.lidar module and
116 many parts of its documentation apply also for r3.in.lidar.
117
118 Figure: Proportional count of points per 3D cell. When 50% of all
119 points in a vertical column fall into a given 3D cell, the value is
120 0.5. Here, the green color was assigned to 0.5, red to 1 and yellow to
121 0. The figure shows vertical slices and green color indicates high veg‐
122 etation while red color indicates bare ground.
123
125 · This module is new and partially experimental. Please don’t
126 rely on its interface and be critical towards its outputs.
127 Please report issues on the mailing list or in the bug tracker.
128
129 · No reprojection is performed, you need to reproject ahead or
130 use GRASS Location which has the right coordinate system which
131 fits with the data.
132
133 · Some temporary maps are created but not cleaned up. Use of
134 --overwrite might be necessary even when not desired.
135
136 · Expects points to have intensity and causing random (undefined)
137 result for related outputs (sum, mean, proportional_sum) when
138 the intensity is not present but the outputs were requested.
139
141 Basic import of the data
142 Set the region according to a 2D raster and adding 3D minimum (bottom),
143 maximum (top) and vertical (top-bottom) resolution.
144 g.region rast=secref b=80 t=160 tbres=5 -p3
145 Now, r3.in.lidar will create the 3D raster of the size given by the
146 computation region:
147 r3.in.lidar input=points.las n=points_n sum=points_sum \
148 mean=points_mean proportional_n=points_n_prop \
149 proportional_sum=points_sum_prop
150
151 Point density vertical structure reduced to the terrain
152 Create ground raster:
153 r.in.lidar input=points.las output=ground method=mean class_filter=2
154 Set vertical extent of computational region to (relative) coordinates
155 above ground:
156 g.region rast=secref b=0 t=47 -p3
157 Compute point density:
158 r3.in.lidar input=points.las n=points_n sum=points_sum \
159 mean=points_mean proportional_n=points_n_prop \
160 proportional_sum=points_sum_prop \
161 base_raster=ground
162
163 Complete workflow for vertical structure analysis
164 Compute the point density of points in 2D while setting the output
165 extent to be based on the data (-e) and the resolution set to a rela‐
166 tively high number (here 10 map units, i.e. meters for metric projec‐
167 tions).
168 r.in.lidar input=points.las output=points_n method=n -e resolution=10
169 This step can be repeated with using different resolutions (and the
170 --overwrite flag) to determine the resolution for the further analysis.
171
172 The class_filter option should be also provided if only part of the
173 points is analyzed, for example class_filter=3,4,5 would be used for
174 low, medium, and high vegetation if the LAS file follows the usedstan‐
175 dard ASPRS class numbers.
176
177 The resolution should be suitable for computing digital elevation model
178 which will be computed in the next steps. Once you decided on the res‐
179 olution, you can use the 2D raster to set the computational region
180 extent and resolution:
181 g.region raster=points_n -p3
182 class_filter=2 is used to limit
183 r.in.lidar input=points.las output=ground_mean method=mean class_filter=2
184 The following steps are not necessary if the point density is high
185 enough to fill the raster continuously.
186
187 Convert the raster to vector point resulting in a decimated point
188 cloud:
189 v.to.rast input=ground_mean type=point output=ground_decimated use=z
190 Interpolate the ground surface from the decimated ground points:
191 v.surf.rst input=ground_decimated elevation=ground
192 Now we need to determine upper vertical limit for the 3D raster (the
193 top value from g.region -p3). This can be potentially done with lower
194 resolution. The -d flag ensures that the ground raster will be used in
195 its actual resolution regardless of the resolution of the output.
196 r.in.lidar input=points.las method=max output=veg_max class_filter=3,4,5 base_raster=ground -d
197 With that, we can finally set up the 3D extent and resolution:
198 g.region rast=secref b=0 t=40 res=1 res3=1 -p3
199 Note that the 2D and 3D resolutions are separate so that user can per‐
200 form the 2D calculations on a finer resolution than the 3D calcula‐
201 tions. The vertical resolution can be and often is set to a different
202 value as well. Here we use the same value for all resolutions for sim‐
203 plicity.
204
205 Finally, we perform the 3D binning where we count number of points per
206 cell (voxel):
207 r3.in.lidar input=points.las n=n class_filter=3,4,5 base_raster=ground -d
208
210 r3.in.xyz, r.in.lidar, v.in.lidar, r.to.rast3, r3.to.rast, r3.mapcalc,
211 g.region
212
214 · V. Petras, A. Petrasova, J. Jeziorska, H. Mitasova (2016): Pro‐
215 cessing UAV and lidar point clouds in GRASS GIS. XXIII ISPRS
216 Congress 2016 [ISPRS Archives, ResearchGate]
217
218 · ASPRS LAS format
219
220 · LAS library
221
222 · LAS library C API documentation
223
225 Vaclav Petras, NCSU GeoForAll Lab
226
227 Last changed: $Date: 2017-11-25 23:27:34 +0100 (Sat, 25 Nov 2017) $
228
230 Available at: r3.in.lidar source code (history)
231
232 Main index | 3D raster index | Topics index | Keywords index | Graphi‐
233 cal index | Full index
234
235 © 2003-2019 GRASS Development Team, GRASS GIS 7.4.4 Reference Manual
236
237
238
239GRASS 7.4.4 r3.in.lidar(1)