v.in.pdal
Converts LAS LiDAR point clouds to a GRASS vector map with PDAL.
v.in.pdal [-wocr] input=name output=name [id_layer=string] [return_layer=string] [class_layer=string] [rgb_layer=string] [spatial=xmin,ymin,xmax,ymax] [zrange=min,max] [return_filter=string] [class_filter=integer [,integer,...]] [input_srs=string] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
v.in.pdal input=name output=name
grass.script.run_command("v.in.pdal", input, output, id_layer=None, return_layer=None, class_layer=None, rgb_layer=None, spatial=None, zrange=None, return_filter=None, class_filter=None, input_srs=None, flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("v.in.pdal", input="name", output="name")
Parameters
input=name [required]
LAS input file
LiDAR input files in LAS format (*.las or *.laz)
output=name [required]
Name for output vector map
id_layer=string
Layer number to store generated point ID as category
Set to 1 by default, use -c to not store it
return_layer=string
Layer number to store return information as category
Leave empty to not store it
class_layer=string
Layer number to store class number as category
Leave empty to not store it
rgb_layer=string
Layer number where RBG colors are stored as category
Leave empty to not store it
spatial=xmin,ymin,xmax,ymax
Import subregion only
Format: xmin,ymin,xmax,ymax - usually W,S,E,N
zrange=min,max
Filter range for z data (min,max)
return_filter=string
Only import points of selected return type
If not specified, all points are imported
Allowed values: first, last, mid
class_filter=integer [,integer,...]
Only import points of selected class(es)
Input is comma separated integers. If not specified, all points are imported.
input_srs=string
Input dataset projection (WKT or EPSG, e.g. EPSG:4326)
Override input dataset coordinate system using EPSG code or WKT definition
-w
Reproject to projects's coordinate system if needed
Reprojects input dataset to the coordinate system of the GRASS project (by default only datasets with the matching coordinate system can be imported
-o
Override projection check (use current project's CRS)
Assume that the dataset has the same coordinate reference system as the current project
-c
Do not automatically add unique ID as category to each point
Create only requested layers and categories
-r
Limit import to the current region
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
input : str, required
LAS input file
LiDAR input files in LAS format (*.las or *.laz)
Used as: input, file, name
output : str, required
Name for output vector map
Used as: output, vector, name
id_layer : str, optional
Layer number to store generated point ID as category
Set to 1 by default, use -c to not store it
Used as: input, layer
return_layer : str, optional
Layer number to store return information as category
Leave empty to not store it
Used as: input, layer
class_layer : str, optional
Layer number to store class number as category
Leave empty to not store it
Used as: input, layer
rgb_layer : str, optional
Layer number where RBG colors are stored as category
Leave empty to not store it
Used as: input, layer
spatial : tuple[float, float, float, float] | list[float] | str, optional
Import subregion only
Format: xmin,ymin,xmax,ymax - usually W,S,E,N
Used as: xmin,ymin,xmax,ymax
zrange : tuple[float, float] | list[float] | str, optional
Filter range for z data (min,max)
Used as: min,max
return_filter : str, optional
Only import points of selected return type
If not specified, all points are imported
Allowed values: first, last, mid
class_filter : int | list[int] | str, optional
Only import points of selected class(es)
Input is comma separated integers. If not specified, all points are imported.
input_srs : str, optional
Input dataset projection (WKT or EPSG, e.g. EPSG:4326)
Override input dataset coordinate system using EPSG code or WKT definition
flags : str, optional
Allowed values: w, o, c, r
w
Reproject to projects's coordinate system if needed
Reprojects input dataset to the coordinate system of the GRASS project (by default only datasets with the matching coordinate system can be imported
o
Override projection check (use current project's CRS)
Assume that the dataset has the same coordinate reference system as the current project
c
Do not automatically add unique ID as category to each point
Create only requested layers and categories
r
Limit import to the current region
overwrite: bool, optional
Allow output files to overwrite existing files
Default: False
verbose: bool, optional
Verbose module output
Default: False
quiet: bool, optional
Quiet module output
Default: False
superquiet: bool, optional
Very quiet module output
Default: False
DESCRIPTION
Imports a point cloud (e.g. from a LAS file) as vector points with the PDAL library. v.in.pdal supports the following filters:
- 2D region filter
- Z coordinates filter
- return filter
- class filter
EXAMPLES
Import only XYZ coordinates of points, limit the import to the current computational region and reproject to the current project's coordinate reference system during the import:
v.in.pdal input=points.las output=points -c -r -w
REFERENCES
- V. Petras, A. Petrasova, J. Jeziorska, H. Mitasova (2016): Processing UAV and lidar point clouds in GRASS GIS. XXIII ISPRS Congress 2016 [ISPRS Archives, ResearchGate]
SEE ALSO
r.in.pdal, g.region, v.vect.stats, v.in.ogr
AUTHOR
Vaclav Petras, NCSU GeoForAll Lab
SOURCE CODE
Available at: v.in.pdal source code
(history)
Latest change: Wednesday Mar 05 14:10:57 2025 in commit 8605efe