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.tools.Tools.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=None, verbose=None, quiet=None, superquiet=None)
Example:
tools = Tools()
tools.v_in_pdal(input="name", output="name")
This grass.tools API is experimental in version 8.5 and expected to be stable in version 8.6.
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=None, verbose=None, quiet=None, superquiet=None)
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 project's coordinate system if needed [deprecated]
This flag is deprecated and will be removed in a future release. Input dataset will always be reprojected if needed.
-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 | io.StringIO, 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 project's coordinate system if needed [deprecated]
This flag is deprecated and will be removed in a future release. Input dataset will always be reprojected if needed.
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: None
verbose : bool, optional
Verbose module output
Default: None
quiet : bool, optional
Quiet module output
Default: None
superquiet : bool, optional
Very quiet module output
Default: None
Returns:
result : grass.tools.support.ToolResult | None
If the tool produces text as standard output, a ToolResult object will be returned. Otherwise, None will be returned.
Raises:
grass.tools.ToolError: When the tool ended with an error.
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 project's coordinate system if needed [deprecated]
This flag is deprecated and will be removed in a future release. Input dataset will always be reprojected if needed.
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: None
verbose : bool, optional
Verbose module output
Default: None
quiet : bool, optional
Quiet module output
Default: None
superquiet : bool, optional
Very quiet module output
Default: None
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
NOTES
The coordinate reference system (CRS) of the input is read from the file metadata and compared with the CRS of the current project (previously called location). When the two differ, the points are reprojected to the project's CRS during the import. The -w flag, which used to be required to allow the reprojection, is deprecated and has no effect.
The -o flag skips the CRS check and assumes that the input is already in the project's CRS. Use it when the file has no CRS metadata or when the metadata is known to be wrong; without it, the import of a file without CRS metadata fails.
EXAMPLES
Import only XYZ coordinates of points, limit the import to the current computational region. The points are reprojected to the project's CRS if the CRS of the input differs:
v.in.pdal input=points.las output=points -c -r
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: Tuesday Sep 29 05:53:52 2026 in commit 475f8ee