GRASS logo

NAME - Converts LAS LiDAR point clouds to a GRASS vector map with libLAS.


vector, import, LIDAR, level1

SYNOPSIS --help [-pruvetcboi] input=name output=name [id_layer=string] [return_layer=string] [class_layer=string] [rgb_layer=string] [spatial=xmin,ymin,xmax,ymax[,xmin,ymin,xmax,ymax,...]] [zrange=min,max] [return_filter=string] [class_filter=integer[,integer,...]] [mask=name] [mask_layer=string] [skip=integer] [preserve=integer] [offset=integer] [limit=integer] [location=name] [--overwrite] [--help] [--verbose] [--quiet] [--ui]


Print LAS file info and exit
Limit import to the current region
Invert mask when selecting points
Use only valid points
Points invalid according to APSRS LAS specification will be filtered out
Extend region extents based on new dataset
Do not create attribute table
Do not automatically add unique ID as category to each point
Create only requested layers and categories
Do not build topology
Advantageous when handling a large number of points
Override projection check (use current location's projection)
Assume that the dataset has same projection as the current location
Create the location specified by the "location" parameter and exit. Do not import the vector data.
Allow output files to overwrite existing files
Print usage summary
Verbose module output
Quiet module output
Force launching GUI dialog


input=name [required]
LAS input file
LiDAR input files in LAS format (*.las or *.laz)
output=name [required]
Name for output vector map
Layer number to store generated point ID as category
Set to 1 by default, use -c to not store it
Layer number to store return information as category
Leave empty to not store it
Layer number to store class number as category
Leave empty to not store it
Layer number where RBG colors are stored as category
Leave empty to not store it
Import subregion only
Format: xmin,ymin,xmax,ymax - usually W,S,E,N
Filter range for z data (min,max)
Only import points of selected return type
If not specified, all points are imported
Options: first, last, mid
Only import points of selected class(es)
Input is comma separated integers. If not specified, all points are imported.
Areas where to import points
Name of vector map with areas where the points should be imported
Layer number or name for mask option
Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
Default: 1
Do not import every n-th point
For example, 5 will import 80 percent of points. If not specified, all points are imported
Import only every n-th point
For example, 4 will import 25 percent of points. If not specified, all points are imported
Skip first n points
Skips the given number of points at the beginning.
Import only n points
Imports only the given number of points
Name for new location to create

Table of contents

DESCRIPTION converts LiDAR point clouds in LAS format to a GRASS vector, using the libLAS library. The created vector is true 3D with x, y, z coordinates.

For larger datasets, it is recommended to not build topology (-b flag). Also, creating a table with attributes can take some time for larger datasets.

The optional spatial parameter defines spatial query extents. This parameter allows the user to restrict the region to a spatial subset while importing the data. All LiDAR points falling into this rectangle subregion are imported. The -r current region flag is identical, but uses the current region settings as the spatial bounds (see g.region).

A LiDAR pulse can have multiple returns. The first return values can be used to obtain a digital surface model (DSM) where e.g. canopy cover is represented. The last return values can be used to obtain a digital terrain model (DTM) where e.g. the forest floor instead of canopy cover is represented. The return_filter option allows selecting one of first, mid, or last returns.

LiDAR points can be already classified into standardized classes. For example, class number 2 represents ground (for other classes see LAS format specification in references). The class_filter option allows selecting one or more classes, as numbers (integers) separated by comma.

Note that proper filtering of the input points in not only critical for the analysis itself but it can also speed up the processing significantly.


Table with selected percentages of points to keep with corresponding decimation parameters:
Table with selected fractions of points to keep with corresponding decimation parameters:
Table with selected fractions of points to throw away with corresponding decimation parameters:

Location Creation attempts to preserve projection information when importing datasets if the source format includes projection information, and if the LAS driver supports it. If the projection of the source dataset does not match the projection of the current location will report an error message ("Projection of dataset does not appear to match current location") and then report the PROJ_INFO parameters of the source dataset.

If the user wishes to ignore the difference between the apparent coordinate system of the source data and the current location, they may pass the -o flag to override the projection check.

If the user wishes to import the data with the full projection definition, it is possible to have automatically create a new location based on the projection and extents of the file being read. This is accomplished by passing the name to be used for the new location via the location parameter. Upon completion of the command, a new location will have been created (with only a PERMANENT mapset), and the vector map will have been imported with the indicated output name into the PERMANENT mapset.


The typical file extensions for the LAS format are .las and .laz (compressed). The compressed LAS (.laz) format can be imported only if libLAS has been compiled with laszip support. It is also recommended to compile libLAS with GDAL, needed to test for matching projections.


This example is analogous to the example used in the GRASS wiki page for importing LAS as vector points.

The sample LAS data are in the file "Serpent Mound Model LAS Data.las", available at

  # print LAS file info -p input="Serpent Mound Model LAS Data.las"

  # create location with projection information of the LAS data -i input="Serpent Mound Model LAS Data.las" location=Serpent_Mound

  # quit and restart GRASS in the newly created location "Serpent_Mound"
  # real import of LiDAR LAS data, without topology and without attribute table -tb input="Serpent Mound Model LAS Data.las" output=Serpent_Mound_Model_pts


ASPRS LAS format
LAS library
LAS library C API documentation

SEE ALSO,, g.region, v.vect.stats,


Markus Metz
Vaclav Petras, NCSU GeoForAll Lab (decimation, cats, areas, zrange)
based on by various authors


Available at: source code (history)

Latest change: Thursday Feb 03 11:10:06 2022 in commit: 547ff44e6aecfb4c9cbf6a4717fc14e521bec0be

Main index | Vector index | Topics index | Keywords index | Graphical index | Full index

© 2003-2023 GRASS Development Team, GRASS GIS 8.2.2dev Reference Manual