1r.in.pdal(1)                GRASS GIS User's Manual               r.in.pdal(1)
2
3
4

NAME

6       r.in.pdal   - Creates a raster map from LAS LiDAR points using univari‐
7       ate statistics.
8

KEYWORDS

10       raster, import, LIDAR, statistics, conversion, aggregation, binning
11

SYNOPSIS

13       r.in.pdal
14       r.in.pdal --help
15       r.in.pdal  [-wenodpg]    [input=name]     [output=name]     [file=name]
16       [method=string]   [type=string]   [base_raster=name]   [zrange=min,max]
17       [zscale=float]   [irange=min,max]    [iscale=float]    [drange=min,max]
18       [dscale=float]     [input_srs=string]     [pth=integer]    [trim=float]
19       [resolution=float]      [return_filter=string]      [class_filter=inte‐
20       ger[,integer,...]]      [dimension=string]      [user_dimension=string]
21       [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]
22
23   Flags:
24       -w
25           Reproject to location’s coordinate system if needed
26           Reprojects input dataset to the coordinate system of the GRASS  lo‐
27           cation (by default only datasets with the matching cordinate system
28           can be imported
29
30       -e
31           Use the extent of the input for the raster extent
32           Set internally computational region  extents  based  on  the  point
33           cloud
34
35       -n
36           Set computation region to match the new raster map
37           Set computation region to match the 2D extent and resolution of the
38           newly created new raster map
39
40       -o
41           Override projection check (use current location’s projection)
42           Assume that the dataset has same projection as the current location
43
44       -d
45           Use base raster resolution instead of computational region
46           For getting values from base raster, use its actual resolution  in‐
47           stead of computational region resolution
48
49       -p
50           Print LAS file info and exit
51
52       -g
53           Print data file extent in shell script style and then exit
54
55       --overwrite
56           Allow output files to overwrite existing files
57
58       --help
59           Print usage summary
60
61       --verbose
62           Verbose module output
63
64       --quiet
65           Quiet module output
66
67       --ui
68           Force launching GUI dialog
69
70   Parameters:
71       input=name
72           LAS input file
73           LiDAR input files in LAS format (*.las or *.laz)
74
75       output=name
76           Name for output raster map
77
78       file=name
79           File containing names of LAS input files
80           LiDAR input files in LAS format (*.las or *.laz)
81
82       method=string
83           Statistic to use for raster values
84           Options:  n,  min,  max,  range,  sum,  mean, stddev, variance, co‐
85           eff_var, median, mode,  percentile,  skewness,  trimmean,  sidnmax,
86           sidnmin, ev1, ev2, ev3
87           Default: mean
88           n: Number of points in cell
89           min: Minimum value of point values in cell
90           max: Maximum value of point values in cell
91           range: Range of point values in cell
92           sum: Sum of point values in cell
93           mean: Mean (average) value of point values in cell
94           stddev: Standard deviation of point values in cell
95           variance: Variance of point values in cell
96           coeff_var: Coefficient of variance of point values in cell
97           median: Median value of point values in cell
98           mode: Mode value of point values in cell
99           percentile: pth (nth) percentile of point values in cell
100           skewness: Skewness of point values in cell
101           trimmean: Trimmed mean of point values in cell
102           sidnmax: Maximum number of points in cell per source ID
103           sidnmin: Minimum number of points in cell per source ID
104           ev1: First eigenvalue of point x, y, z coordinates
105           ev2: Second eigenvalue of point x, y, z coordinates
106           ev3: Third eigenvalue of point x, y, z coordinates
107
108       type=string
109           Type of raster map to be created
110           Storage type for resultant raster map
111           Options: CELL, FCELL, DCELL
112           Default: FCELL
113           CELL: Integer
114           FCELL: Single precision floating point
115           DCELL: Double precision floating point
116
117       base_raster=name
118           Subtract raster values from the Z coordinates
119           The  scale  for Z is applied beforehand, the range filter for Z af‐
120           terwards
121
122       zrange=min,max
123           Filter range for Z data (min,max)
124           Applied after base_raster transformation step
125
126       zscale=float
127           Scale to apply to Z data
128           Default: 1.0
129
130       irange=min,max
131           Filter range for intensity values (min,max)
132
133       iscale=float
134           Scale to apply to intensity values
135           Default: 1.0
136
137       drange=min,max
138           Filter range for output dimension values (min,max)
139
140       dscale=float
141           Scale to apply to output dimension values
142           Use if output dimension is not Z or intensity
143
144       input_srs=string
145           Input dataset projection (WKT or EPSG, e.g. EPSG:4326)
146           Override input dataset coordinate system using  EPSG  code  or  WKT
147           definition
148
149       pth=integer
150           pth percentile of the values
151           Options: 1-100
152
153       trim=float
154           Discard given percentage of the smallest and largest values
155           Discard  <trim>  percent  of the smallest and <trim> percent of the
156           largest observations
157           Options: 0-50
158
159       resolution=float
160           Output raster resolution
161
162       return_filter=string
163           Only import points of selected return type
164           If not specified, all points are imported
165           Options: first, last, mid
166
167       class_filter=integer[,integer,...]
168           Only import points of selected class(es)
169           Input is comma separated integers. If not specified, all points are
170           imported.
171
172       dimension=string
173           Dimension (variable) to use for raster values
174           Options:  z,  intensity,  number, returns, direction, angle, class,
175           source
176           Default: z
177           z: Z coordinate
178           intensity: Intensity
179           number: Return number
180           returns: Number of returns
181           direction: Scan direction
182           angle: Scan angle
183           class: Point class value
184           source: Source ID
185
186       user_dimension=string
187           Custom dimension (variable) to use for raster values
188           PDAL dimension name
189

DESCRIPTION

191       The r.in.pdal module loads PDAL library supported  point  clouds  (with
192       emphasis  on  LiDAR LAS files) into a new raster map using binning. The
193       user may choose from a variety of statistical  methods  which  will  be
194       used for binning when creating the new raster.
195
196       Since  a  new  raster map is created during the binning, the binning of
197       points depends on the current computational region settings (extent and
198       resolution)  by default (see more about binning below).  When using the
199       -e flag, the binning will be done in the extent of the point cloud,  so
200       the  resulting  raster will have extent based on the input point cloud.
201       When the resolution=value parameter is used, the binning is done  using
202       the provided resolution and the resulting raster will have that resolu‐
203       tion (see more below for more information about extent  and  resolution
204       management).
205
206       r.in.pdal  is designed for processing massive point cloud datasets, for
207       example raw LiDAR or sidescan sonar swath data.
208
209   Binning
210       The main difference between r.in.pdal and v.in.pdal is  that  r.in.pdal
211       creates  a  raster instead of just importing the points into GRASS GIS.
212       However, r.in.pdal does not merely rasterizes the points from the point
213       cloud.  r.in.pdal  uses  binning to derive values for individual raster
214       cells, so the value of a cell is typically an aggregation of values  of
215       individual  points  falling  into  one cell.  In general binning is the
216       conversion of points into a regular grid.  The binning of points with X
217       and  Y  coordinates  starts with the overlay of a grid of bins over the
218       points.
219
220       In the basic case, binning is a  method  which  counts  the  number  of
221       points  which fall into one raster cell, i.e. bin. The number of points
222       per cell (bin) indicates the density of points in the point cloud.  The
223       cell (bin) is always square or rectangular in case of r.in.pdal because
224       the result is GRASS GIS 2D raster.  The result  of  binning  where  the
225       number  of point per cell is counted is sometimes called 2D (two dimen‐
226       sional) histogram because a histogram is used in univariate  statistics
227       (in  one  dimension)  to  count the number samples falling into a given
228       bin.
229
230        Figure: The binning on left was used to count  number  of  points  per
231       (sometimes also called 2D histogram). The numbers in cells are examples
232       of counts, the rest is represented by the color.  The binning on  right
233       was  used  with mean to create a surface based on the values associated
234       with the points. The numbers show examples of cell  values.  Note  also
235       the  cells  without any points which were assigned the NULL value.  The
236       basic concept of binning is extended when the points have another value
237       associated with them. For LiDAR data this value can be the Z coordinate
238       or intensity. The value for a given cell (bin) is computed  using  uni‐
239       variate  statistics from the values of all points in the cell.  For ex‐
240       ample, computing the mean value of Z coordinates  can  yield  a  raster
241       representing  the digital elevation model. Another example is the range
242       of Z coordinates which can be used as a rough  estimate  of  vegetation
243       height.
244
245   Statistics
246       Available statistics for populating the output raster map are:
247
248       n
249           This  computes the number (count) of points per cell. The result is
250           a indicator of spatially variable density of points  in  the  given
251           area.
252
253       min
254           This  finds  the  minimum  of point values in each cell.  It can be
255           useful when finding topography in a forested or  urban  environment
256           and  there is a lot of points per one cells (terrain is oversampled
257           considering the desired resolution).  It can also  create  surfaces
258           independent  on the noise from premature hits as it will always se‐
259           lect the lowest point.
260
261       max
262           This finds the maximum of point values in each cell.  In connection
263           with  base_raster it can yield maximum vegetation of feature height
264           per cell.  For this purpose, it is usually  much  more  appropriate
265           than mean which would yield heights mostly influenced by the verti‐
266           cal distribution of points.
267
268       range
269           This computes the range of point values in each cell.  The range of
270           Z  coordinates  per cell can be used as a rough estimate of vegeta‐
271           tion height when the cells are small enough,  slopes  low  and  the
272           area is mostly vegetated.  However, for more profound analysis, the
273           base raster together with different statistics is recommended.
274
275       sum
276           This computes the sum of point values per cell.  This is useful es‐
277           pecially when intensity is used as a value.
278
279       mean
280           This  is a mean (average) value of point values in cell.  When used
281           with Z coordinates (the default) and points from the ground  class,
282           the  resulting raster is a digital elevation model.  When intensity
283           is used as a point value, the resulting raster contains mean inten‐
284           sity per cell.  Note that mean gives heights influenced by the ver‐
285           tical distribution of points.
286
287       stddev
288           This computes the standard deviation of point values for each cell.
289
290       variance
291           This computes the variance of point values for each cell.  Variance
292           and  derivatives use the biased estimator (n).  It is calculated by
293           Welford algorithm.
294
295       coeff_var
296           This computes the coefficient of variance of point values for  each
297           cell. Coefficient of variance is given in percentage and defined as
298           100 * sqrt(variance) / mean.
299
300       median
301           This computes the median of point values for each cell
302
303       mode
304           This computes the mode (the most common value) of point values  for
305           each  cell.   If  there are more than one mode for a cell, an arbi‐
306           trary one will be selected.
307
308       percentile
309           pth (nth) percentile of points in cell
310
311       skewness
312           This is a skewness of point values in cell
313
314       trimmean
315           This is a trimmed mean of point values in cell.  Trimmed mean  also
316           know  as  truncated mean is a mean computed after discarding values
317           at the low end and at the high end.  How many values to discard  is
318           given  by  the trim option in percent. In statistics the usual per‐
319           centage of trimmed values ranges from 5 to 25 percent.
320
321       sidnmax
322           Maximum number of points in cell per source ID.  Points are counted
323           for  each  source separately and largest count is used as the final
324           cell value. Corresponds to majority density (Dmax)  as  defined  by
325           Smeeckaert et al., 2013.
326
327       sidnmin
328           Minimum number of points in cell per source ID.  Points are counted
329           for each source separately and smallest count is used as the  final
330           cell  value.  Corresponds  to minority density (Dmin) as defined by
331           Smeeckaert et al., 2013.
332
333       ev1, ev2, ev3
334           1st, 2nd and 3rd eigenvalue of point x, y and z coordinates  within
335           a  cell  (Mallet et al. 2011).  Note that different statistics have
336           different memory requirements (see below for details).
337
338       In varied terrain the user may find that min maps make for a good noise
339       filter as most LIDAR noise is from premature hits. The min map may also
340       be useful to find the underlying topography in a forested or urban  en‐
341       vironment if the cells are oversampled.
342
343   Filtering and selection
344       Points are always filtered by spatial extent (based on current computa‐
345       tional region) unless -e flag is set. Afterwards import  value  scaling
346       is performed, followed by filtering by having value in range.
347
348       Points  falling  outside  the  current  computational  region  will  be
349       skipped.  This includes points falling exactly on the southern or east‐
350       ern region bound. To capture those adjust the region with:
351       g.region s=s-0.000001
352       See  g.region  for  details  about computation region handling in GRASS
353       GIS.
354
355       The zrange parameter may be used for filtering the input data by verti‐
356       cal  extent.  Example  uses  include filtering out extreme outliers and
357       outliers on relatively flat terrain.  This parameter can be  also  used
358       for  cutting  the  point  cloud into vertical sections preparing it for
359       further processing by separate sections, together as if it would be  an
360       imagery  group  (see  i.group),  or  combined  into  a  3D raster using
361       r.to.rast3.  In for these last examples, it might actually be more  ad‐
362       vantageous  to  use  r3.in.lidar module.  The zrange parameter is espe‐
363       cially powerful when used together with the base_raster parameter.  The
364       zrange is applied to Z values after the base_raster reduction.
365
366         Figure: This is the principle of zrange filter. Points with the Z co‐
367       ordinate value below the lower value in the range (here 180)  are  fil‐
368       tered  out (blue points) and same applies for points above higher value
369       in the range (here 250). All other points are preserved (green points).
370
371       Filtering can be performed also on intensity values with irange parame‐
372       ter. If imported dimension is neither Z nor intensity, filtering can be
373       performed with drange parameter. Filtering by Z  values  and  intensity
374       can  be performed independently on imported dimension.  If imported di‐
375       mension is not Z nor intensity, filtering can  be  performed  with  all
376       three  parameters  simultaneously (zrange, irange and drange) or any of
377       their combination.
378
379       A LiDAR pulse can have multiple returns. The first return values can be
380       used to obtain a digital surface model (DSM) where e.g. canopy cover is
381       represented. The last return values can be used  to  obtain  a  digital
382       terrain model (DTM) where e.g. the forest floor instead of canopy cover
383       is represented. The return_filter option allows selecting one of first,
384       mid,  or last returns. Return number and number of returns in the pulse
385       associated with each point are compared to determine if  the  point  is
386       first, mid, or last return.
387
388       LiDAR  points  often  come  as  already  classified  into  standardized
389       classes.  For example, class number  2  represents  ground.  For  other
390       classes  see  LAS  format specification in references. The class_filter
391       option allows selecting one or more classes  using  numbers  (integers)
392       separated by comma.
393
394       The  user can use a combination of r.in.pdal output maps to create cus‐
395       tom raster-based filters, for  examplee,  use  r.mapcalc  to  create  a
396       mean-(2*stddev)  map.  (In  this example the user may want to include a
397       lower bound filter in r.mapcalc to remove highly variable points (small
398       n) or run r.neighbors to smooth the stddev map before further use.)
399
400       Note that proper filtering of the input points in not only critical for
401       the analysis itself but it can also speed up the processing.
402
403       LiDAR points can contain a lot of attributes besides their coordinates.
404       By  default  r.in.pdal will use point Z coordinate as the output raster
405       value source. The dimension option allows  using  different  point  at‐
406       tributes as an output instead of Z value. In case if other than Z value
407       is chosen, output map type will be set to CELL. Explanation of  various
408       attributes  can  be  found  in  LAS  Specification  chapter "Point Data
409       Records". Be ware - not all attributes might be present and also  their
410       value ranges and meaning might vary between LAS file producers.
411
412       PDAL  supports  creation of custom dimensions (point attributes) in LAS
413       files.  Use user_dimension option to provide name of any dimension  for
414       import. This option supersedes one specified by dimension option.
415
416   Reduction to a base raster
417       For  analysis of features on the terrain surface, especially vegetation
418       it is advantageous to remove the influence of the  terrain  on  heights
419       because  the  height  above  the terrain is important (e.g. height of a
420       tree) rather than height of the top of the tree above  the  see  level.
421       In  this  case,  the base raster would be digital elevation model which
422       can be one derived from the point cloud, or obtained in some other way.
423       LiDAR  data often come with precomputed DEMs (quality should be checked
424       in this case) and there is often a DEM available for a given area  (fit
425       with  the  point  cloud,  especially vertical, and resolution should be
426       checked).
427
428        Figure: This is a profile of base raster (in orange) representing dig‐
429       ital elevation model and selected points, e.g. first return, from point
430       cloud (green dots). By default the points would create a  digital  sur‐
431       face model (thin brown line) but after reducing the Z coordinates using
432       the base raster, the created surface is a derived from  the  height  of
433       points  relative  to  the base raster.  The usage of base raster is not
434       limited to digital elevation model.  The base raster can be any surface
435       which  has  some relation to the point values, for example digital sur‐
436       face model representing top of the canopy.
437
438   Setting extent and resolution
439       Since the creation of raster maps depends on the  computational  region
440       settings (extent and resolution), as default the current region extents
441       and resolution are used for the import. When using the  -e  flag  along
442       with the resolution=value parameter, the region used for the new raster
443       will be based the point cloud extent and the provided resolution. It is
444       therefore  recommended  to  first use the -s flag to get the extents of
445       the LiDAR point cloud to be imported, then adjust  the  current  region
446       extent  and  resolution accordingly, and only then proceed with the ac‐
447       tual import.  Another option is to automatically set the region extents
448       based on the LAS dataset itself (-e flag) along with the desired raster
449       resolution. The best option is to know the point  cloud  extent  ahead,
450       e.g. from tiling scheme, and use it. See below for details.
451
452       Since  the  r.in.pdal  generates  a raster map through binning from the
453       original LiDAR points, the target computational region extent and reso‐
454       lution  have to be determined. A typical workflow would involve the ex‐
455       amination of the LAS data’s associated documentation or the scan of the
456       LAS data file with r.in.pdal’s -g flag to find the input data’s bounds.
457
458       Another  option is to automatically set the region extents based on the
459       LAS dataset extent (-e flag) along with the desired  raster  resolution
460       using the resolution parameter.
461
462       The  -g  flag prints extent of input data set(s) in a shell style suit‐
463       able as command line parameters for g.region. Note,  extent  is  deter‐
464       mined  from data set(s) metadata and without scanning whole dataset and
465       thus selectros and filters are not applied.
466
467       A simpler option is to automatically set the region  extents  based  on
468       the LAS dataset (-e flag) along with the target raster resolution using
469       the resolution parameter. Also here it is recommended to verify and op‐
470       timize  the  resulting region settings with g.region prior to importing
471       the dataset.
472
473   Transformation
474       Point Z axis values can be altered by scaling parameter set by  zscale.
475       Each point X axis value is multiplied by provided value before any fil‐
476       tering or further transformation takes place. In the same way  act  is‐
477       cale and dscale parameters - values are multiplied before range filters
478       irange or drnage are applied (if present).
479
480       Output value scaling can be performed  independently  of  filtering  by
481       providing  dscale  parameter. This scaling parameter is applied only to
482       output value independently of its dimension. Thus if zrange and  dscale
483       are  set  for Z output dimension, filtering by zrange will be done with
484       unscaled values but output will be  scaled  by  dscale.   dscale  takes
485       precedence  over  zscale  and iscale if more than one parameter is pro‐
486       vided.
487

NOTES

489   Format and projection support
490       The typical file extensions for the LAS format are .las and .laz  (com‐
491       pressed).  The compressed LAS (.laz) format can be imported only if li‐
492       bLAS has been compiled with LASzip support. It is also  recommended  to
493       compile  libLAS  with  GDAL which is used to test if the LAS projection
494       matches that of the GRASS location.
495
496   Memory consumption
497       While the input file can be arbitrarily large,  r.in.pdal  will  use  a
498       large  amount  of  system  memory  (RAM)  for  large  raster regions (>
499       10000x10000 pixels).  If the module refuses to start  complaining  that
500       there  isn’t enough memory, use the percent parameter to run the module
501       in several passes.  In addition using a less precise map  format  (CELL
502       [integer]  or FCELL [floating point]) will use less memory than a DCELL
503       [double precision floating point] output  map.   For  methods=n,  mode,
504       sidnmin, sidnmax, the CELL format is used automatically.
505
506       The mean and range methods will use average amount of memory (comparing
507       to other methods).  Methods such as n, min, max, and sum will use  less
508       memory, while stddev, variance, and coeff_var will use more.
509
510       The memory usage for regular statistics mentioned above is based solely
511       on region (raster) size.   However,  the  aggregate  functions  median,
512       mode,  percentile,  skewness  and trimmean will use more memory and may
513       not be appropriate for use with arbitrarily large input files without a
514       small  value for the percent option because unlike the other statistics
515       memory use for these also depends on the number of data points.
516
517       The default map type=FCELL is intended as compromise between preserving
518       data precision and limiting system resource consumption.
519
520   Trim option
521       Trim  option  value  is used only when calculating trimmed mean values.
522       Attempt to use it with other statistical methods will result in an  er‐
523       ror.
524
525   Print flag
526       The  -p  flag will use PDAL library built-in LAS file metadata printing
527       function. It will also include a list of supported dimension names. Any
528       of listed dimensions can be passed to the user_dimension option. Dimen‐
529       sions are not checked for presence of data for any  of  points  in  the
530       file  and thus importing a dimension without actual data will result in
531       an empty map.
532

EXAMPLES

534       Simple example of binning of point from a LAS file into a newly created
535       raster map in an existing location/mapset (using metric units):
536       # set the computational region automatically, resol. for binning is 5m
537       r.in.pdal -e -o input=points.las resolution=5 output=lidar_dem_mean
538       g.region raster=lidar_dem_mean -p
539       r.univar lidar_dem_mean
540
541   Finding suitable extent and resolution
542       For the output raster map, a suitable resolution can be found by divid‐
543       ing the number of input points by the area covered  (this  requires  an
544       iterative approach as outlined here):
545       # print LAS metadata (Number of Points)
546       r.in.pdal -p input=points.las
547       # Point count: 1287775
548       # scan for LAS points cloud extent
549       r.in.pdal -g input=points.las output=dummy -o
550       # n=2193507.740000 s=2190053.450000 e=6070237.920000 w=6066629.860000 b=-3.600000 t=906.000000
551       # set computation region to this extent
552       g.region n=2193507.740000 s=2190053.450000 e=6070237.920000 w=6066629.860000 -p
553       # print resulting extent
554       g.region -p
555       #  rows:       3454
556       #  cols:       3608
557       # points_per_cell = n_points / (rows * cols)
558       # Here: 1287775 / (3454 * 3608) = 0.1033359 LiDAR points/raster cell
559       # As this is too low, we need to select a lower raster resolution
560       g.region res=5 -ap
561       #  rows:       692
562       #  cols:       723
563       #  Now: 1287775 / (692 * 723) = 2.573923 LiDAR points/raster cell
564       # import as mean
565       r.in.pdal input=points.las output=lidar_dem_mean method=mean -o
566       # import as max
567       r.in.pdal input=points.las output=lidar_dem_max method=max -o
568       # import as p’th percentile of the values
569       r.in.pdal input=points.las output=lidar_dem_percentile_95 \
570                  method=percentile pth=95 -o
571       Mean value DEM in perspective view, imported from LAS file
572
573       Further hints: how to calculate number of LiDAR points/square meter:
574       g.region -e
575         # Metric location:
576         # points_per_sq_m = n_points / (ns_extent * ew_extent)
577         # Lat/Lon location:
578         # points_per_sq_m = n_points / (ns_extent * ew_extent*cos(lat) * (1852*60)^2)
579
580   Serpent Mound dataset
581       This  example  is  analogous to the example used in the GRASS wiki page
582       for importing LAS as raster DEM.
583
584       The sample LAS data are in the file "Serpent Mound Model LAS Data.las",
585       available at appliedimagery.com:
586       # print LAS file info
587       r.in.pdal -p input="Serpent Mound Model LAS Data.las"
588       # using v.in.lidar to create a new location
589       # create location with projection information of the LAS data
590       v.in.lidar -i input="Serpent Mound Model LAS Data.las" location=Serpent_Mound
591       # quit and restart GRASS in the newly created location "Serpent_Mound"
592       # scan the extents of the LAS data
593       r.in.pdal -g input="Serpent Mound Model LAS Data.las"
594       # set the region to the extents of the LAS data, align to resolution
595       g.region n=4323641.57 s=4320942.61 w=289020.90 e=290106.02 res=1 -ap
596       # import as raster DEM
597       r.in.pdal input="Serpent Mound Model LAS Data.las" \
598                  output=Serpent_Mound_Model_LAS_Data method=mean
599
600       Figure: Elevation for the whole area of Serpent Mound dataset
601
602   Height above ground
603       The  mean  height  above  ground of the points can be computed for each
604       raster cell (the ground elevation is given by  the  raster  map  eleva‐
605       tion):
606       g.region raster=elevation -p
607       r.in.pdal input=points.las output=mean_height_above_ground base_raster=elevation method=mean
608       In  this  type  of  computation, it might be advantageous to change the
609       resolution to match the precision of the points rather than deriving it
610       from the base raster.
611
612   Multiple file input
613       The  file option requres a file that contains a list of file names with
614       the  full  path.  For  example,  a  list  of  files  in  the  directory
615       /home/user/data:
616       points1.laz
617       points2.laz
618       points3.laz
619       would be lised in the file as:
620       /home/user/data/points1.laz
621       /home/user/data/points2.laz
622       /home/user/data/points3.laz
623       On  Linux  and  OSX,  this file can be automatically generated with the
624       command:
625       ls /home/user/data/*.laz > /home/user/data/filelist.txt
626       On Windows:
627       dir /b c:\users\user\data\*.laz > c:\users\user\data\filelist.txt
628       The mean height above ground example above would then be:
629       g.region raster=elevation -p
630       r.in.pdal file=/home/user/data/filelist.txt output=mean_height_above_ground base_raster=elevation method=mean
631       In Python, the list of files can be created using the glob Python  mod‐
632       ule:
633       import glob
634       import gscript
635       file_list_name = ’/home/user/data/filelist.txt’
636       with open(, mode=’w’) as file_list:
637           for path in glob.iglob(’/home/user/data/lidar/*.las’):
638               file_list.write(path + "\n")
639       gscript.run_command(’r.in.pdal’, file=file_list_name,
640                           output=’mean_height_above_ground’,
641                           base_raster=’elevation’ method=’mean’)
642

KNOWN ISSUES

644           •   Only  one  method  can be applied for a single run and multiple
645               map output from a single run  (e.g.  method=string[,string,...]
646               output=name[,name,...]   or  n=string  mean=string)  is no sup‐
647               ported.
648       If you encounter any problems (or solutions!) please contact the  GRASS
649       Development Team.
650

SEE ALSO

652         g.region,  r.in.xyz,  r.mapcalc,  r.univar,  v.in.lidar, r3.in.lidar,
653       v.vect.stats
654       v.lidar.correction, v.lidar.edgedetection, v.lidar.growing,  v.outlier,
655       v.surf.bspline
656       Trimmed mean (Truncated mean, Wikipedia article), OpenTopography (LiDAR
657       point cloud repository)
658

REFERENCES

660           •   V. Petras, A. Petrasova, J. Jeziorska, H. Mitasova (2016): Pro‐
661               cessing  UAV  and lidar point clouds in GRASS GIS.  XXIII ISPRS
662               Congress 2016 [ISPRS Archives, ResearchGate]
663
664           •   ASPRS LAS format
665
666           •   PDAL - Point Data Abstraction Library
667

AUTHORS

669       Markus Metz
670       Vaclav Petras, NCSU GeoForAll Lab (base_raster option, documentation),
671       Maris Nartiss, LU GZZF (refactoring, additional filters, custom  dimen‐
672       sion support)
673       based on r.in.xyz by Hamish Bowman and Volker Wichmann
674

SOURCE CODE

676       Available at: r.in.pdal source code (history)
677
678       Accessed: Saturday Jan 21 21:14:59 2023
679
680       Main  index  | Raster index | Topics index | Keywords index | Graphical
681       index | Full index
682
683       © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
684
685
686
687GRASS 8.2.1                                                       r.in.pdal(1)
Impressum