---
name: v.in.pdal
description: Converts LAS LiDAR point clouds to a GRASS vector map with PDAL.
keywords: [ vector, import, LIDAR ]
---

# v.in.pdal

Converts LAS LiDAR point clouds to a GRASS vector map with PDAL.

=== "Command line"

    **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:

    ```sh
    v.in.pdal input=name output=name
    ```

=== "Python (grass.tools)"

    *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:

    ```python
    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.

=== "Python (grass.script)"

    *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:

    ```python
    gs.run_command("v.in.pdal", input="name", output="name")
    ```

## Parameters

=== "Command line"

    **input**=*name* **[required]**  
    &nbsp;&nbsp;&nbsp;&nbsp;LAS input file  
    &nbsp;&nbsp;&nbsp;&nbsp;LiDAR input files in LAS format (\*.las or \*.laz)  
    **output**=*name* **[required]**  
    &nbsp;&nbsp;&nbsp;&nbsp;Name for output vector map  
    **id_layer**=*string*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer number to store generated point ID as category  
    &nbsp;&nbsp;&nbsp;&nbsp;Set to 1 by default, use -c to not store it  
    **return_layer**=*string*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer number to store return information as category  
    &nbsp;&nbsp;&nbsp;&nbsp;Leave empty to not store it  
    **class_layer**=*string*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer number to store class number as category  
    &nbsp;&nbsp;&nbsp;&nbsp;Leave empty to not store it  
    **rgb_layer**=*string*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer number where RBG colors are stored as category  
    &nbsp;&nbsp;&nbsp;&nbsp;Leave empty to not store it  
    **spatial**=*xmin,ymin,xmax,ymax*  
    &nbsp;&nbsp;&nbsp;&nbsp;Import subregion only  
    &nbsp;&nbsp;&nbsp;&nbsp;Format: xmin,ymin,xmax,ymax - usually W,S,E,N  
    **zrange**=*min,max*  
    &nbsp;&nbsp;&nbsp;&nbsp;Filter range for z data (min,max)  
    **return_filter**=*string*  
    &nbsp;&nbsp;&nbsp;&nbsp;Only import points of selected return type  
    &nbsp;&nbsp;&nbsp;&nbsp;If not specified, all points are imported  
    &nbsp;&nbsp;&nbsp;&nbsp;Allowed values: *first, last, mid*  
    **class_filter**=*integer* [,*integer*,...]  
    &nbsp;&nbsp;&nbsp;&nbsp;Only import points of selected class(es)  
    &nbsp;&nbsp;&nbsp;&nbsp;Input is comma separated integers. If not specified, all points are imported.  
    **input_srs**=*string*  
    &nbsp;&nbsp;&nbsp;&nbsp;Input dataset projection (WKT or EPSG, e.g. EPSG:4326)  
    &nbsp;&nbsp;&nbsp;&nbsp;Override input dataset coordinate system using EPSG code or WKT definition  
    **-w**  
    &nbsp;&nbsp;&nbsp;&nbsp;Reproject to projects's coordinate system if needed  
    &nbsp;&nbsp;&nbsp;&nbsp;Reprojects input dataset to the coordinate system of the GRASS project (by default only datasets with the matching coordinate system can be imported  
    **-o**  
    &nbsp;&nbsp;&nbsp;&nbsp;Override projection check (use current project's CRS)  
    &nbsp;&nbsp;&nbsp;&nbsp;Assume that the dataset has the same coordinate reference system as the current project  
    **-c**  
    &nbsp;&nbsp;&nbsp;&nbsp;Do not automatically add unique ID as category to each point  
    &nbsp;&nbsp;&nbsp;&nbsp;Create only requested layers and categories  
    **-r**  
    &nbsp;&nbsp;&nbsp;&nbsp;Limit import to the current region  
    **--overwrite**  
    &nbsp;&nbsp;&nbsp;&nbsp;Allow output files to overwrite existing files  
    **--help**  
    &nbsp;&nbsp;&nbsp;&nbsp;Print usage summary  
    **--verbose**  
    &nbsp;&nbsp;&nbsp;&nbsp;Verbose module output  
    **--quiet**  
    &nbsp;&nbsp;&nbsp;&nbsp;Quiet module output  
    **--qq**  
    &nbsp;&nbsp;&nbsp;&nbsp;Very quiet module output  
    **--ui**  
    &nbsp;&nbsp;&nbsp;&nbsp;Force launching GUI dialog

=== "Python (grass.tools)"

    **input** : str | io.StringIO, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;LAS input file  
    &nbsp;&nbsp;&nbsp;&nbsp;LiDAR input files in LAS format (\*.las or \*.laz)  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, file, *name*  
    **output** : str, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name for output vector map  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: output, vector, *name*  
    **id_layer** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer number to store generated point ID as category  
    &nbsp;&nbsp;&nbsp;&nbsp;Set to 1 by default, use -c to not store it  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, layer  
    **return_layer** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer number to store return information as category  
    &nbsp;&nbsp;&nbsp;&nbsp;Leave empty to not store it  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, layer  
    **class_layer** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer number to store class number as category  
    &nbsp;&nbsp;&nbsp;&nbsp;Leave empty to not store it  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, layer  
    **rgb_layer** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer number where RBG colors are stored as category  
    &nbsp;&nbsp;&nbsp;&nbsp;Leave empty to not store it  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, layer  
    **spatial** : tuple[float, float, float, float] | list[float] | str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Import subregion only  
    &nbsp;&nbsp;&nbsp;&nbsp;Format: xmin,ymin,xmax,ymax - usually W,S,E,N  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: *xmin,ymin,xmax,ymax*  
    **zrange** : tuple[float, float] | list[float] | str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Filter range for z data (min,max)  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: *min,max*  
    **return_filter** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Only import points of selected return type  
    &nbsp;&nbsp;&nbsp;&nbsp;If not specified, all points are imported  
    &nbsp;&nbsp;&nbsp;&nbsp;Allowed values: *first, last, mid*  
    **class_filter** : int | list[int] | str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Only import points of selected class(es)  
    &nbsp;&nbsp;&nbsp;&nbsp;Input is comma separated integers. If not specified, all points are imported.  
    **input_srs** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Input dataset projection (WKT or EPSG, e.g. EPSG:4326)  
    &nbsp;&nbsp;&nbsp;&nbsp;Override input dataset coordinate system using EPSG code or WKT definition  
    **flags** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Allowed values: *w*, *o*, *c*, *r*  
    &nbsp;&nbsp;&nbsp;&nbsp;**w**  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reproject to projects's coordinate system if needed  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reprojects input dataset to the coordinate system of the GRASS project (by default only datasets with the matching coordinate system can be imported  
    &nbsp;&nbsp;&nbsp;&nbsp;**o**  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Override projection check (use current project's CRS)  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Assume that the dataset has the same coordinate reference system as the current project  
    &nbsp;&nbsp;&nbsp;&nbsp;**c**  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do not automatically add unique ID as category to each point  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create only requested layers and categories  
    &nbsp;&nbsp;&nbsp;&nbsp;**r**  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Limit import to the current region  
    **overwrite** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Allow output files to overwrite existing files  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **verbose** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Verbose module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **quiet** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Quiet module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **superquiet** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Very quiet module output  
    &nbsp;&nbsp;&nbsp;&nbsp;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.

=== "Python (grass.script)"

    **input** : str, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;LAS input file  
    &nbsp;&nbsp;&nbsp;&nbsp;LiDAR input files in LAS format (\*.las or \*.laz)  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, file, *name*  
    **output** : str, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name for output vector map  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: output, vector, *name*  
    **id_layer** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer number to store generated point ID as category  
    &nbsp;&nbsp;&nbsp;&nbsp;Set to 1 by default, use -c to not store it  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, layer  
    **return_layer** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer number to store return information as category  
    &nbsp;&nbsp;&nbsp;&nbsp;Leave empty to not store it  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, layer  
    **class_layer** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer number to store class number as category  
    &nbsp;&nbsp;&nbsp;&nbsp;Leave empty to not store it  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, layer  
    **rgb_layer** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer number where RBG colors are stored as category  
    &nbsp;&nbsp;&nbsp;&nbsp;Leave empty to not store it  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, layer  
    **spatial** : tuple[float, float, float, float] | list[float] | str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Import subregion only  
    &nbsp;&nbsp;&nbsp;&nbsp;Format: xmin,ymin,xmax,ymax - usually W,S,E,N  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: *xmin,ymin,xmax,ymax*  
    **zrange** : tuple[float, float] | list[float] | str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Filter range for z data (min,max)  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: *min,max*  
    **return_filter** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Only import points of selected return type  
    &nbsp;&nbsp;&nbsp;&nbsp;If not specified, all points are imported  
    &nbsp;&nbsp;&nbsp;&nbsp;Allowed values: *first, last, mid*  
    **class_filter** : int | list[int] | str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Only import points of selected class(es)  
    &nbsp;&nbsp;&nbsp;&nbsp;Input is comma separated integers. If not specified, all points are imported.  
    **input_srs** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Input dataset projection (WKT or EPSG, e.g. EPSG:4326)  
    &nbsp;&nbsp;&nbsp;&nbsp;Override input dataset coordinate system using EPSG code or WKT definition  
    **flags** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Allowed values: *w*, *o*, *c*, *r*  
    &nbsp;&nbsp;&nbsp;&nbsp;**w**  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reproject to projects's coordinate system if needed  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reprojects input dataset to the coordinate system of the GRASS project (by default only datasets with the matching coordinate system can be imported  
    &nbsp;&nbsp;&nbsp;&nbsp;**o**  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Override projection check (use current project's CRS)  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Assume that the dataset has the same coordinate reference system as the current project  
    &nbsp;&nbsp;&nbsp;&nbsp;**c**  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do not automatically add unique ID as category to each point  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create only requested layers and categories  
    &nbsp;&nbsp;&nbsp;&nbsp;**r**  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Limit import to the current region  
    **overwrite** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Allow output files to overwrite existing files  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **verbose** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Verbose module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **quiet** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Quiet module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **superquiet** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Very quiet module output  
    &nbsp;&nbsp;&nbsp;&nbsp;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

## 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:

```sh
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](https://doi.org/10.5194/isprs-archives-XLI-B7-945-2016),
  [ResearchGate](https://www.researchgate.net/publication/304340172_Processing_UAV_and_lidar_point_clouds_in_GRASS_GIS)\]

## SEE ALSO

*[r.in.pdal](r.in.pdal.md), [g.region](g.region.md),
[v.vect.stats](v.vect.stats.md), [v.in.ogr](v.in.ogr.md)*

## AUTHOR

Vaclav Petras, [NCSU GeoForAll
Lab](https://geospatial.ncsu.edu/geoforall/)

## SOURCE CODE

Available at: [v.in.pdal source code](https://github.com/OSGeo/grass/tree/main/vector/v.in.pdal)
([history](https://github.com/OSGeo/grass/commits/main/vector/v.in.pdal))  
Accessed: Monday May 11 17:55:11 2026
