LasConverter

Converts the points of a LAS lidar file into a vector of points, with their elevation, intensity, classification and return number, or into a csv file, or into a new LAS file with a selection of the points. The points can be filtered by area, with a bounding box or polygons, by classes, as 2 for the ground, by returns, as 1 for the first ones or last for the last one of each pulse, and by ranges of intensity and elevation. It can also just print the header of the file and information about its points. The vector can be a shapefile or a layer of a GeoPackage, as points.gpkg#points.

Details

The filters are combined: a point is kept only if it passes all the given ones. The ranges include their limits. The area of the bounding box is used only if all its four boundaries are given.

In the list of the returns, last keeps the last return of each pulse, also when it is the only one: 1,last keeps the first and the last returns, the outline of the canopy and what is under it. The returns of a pulse are numbered from 1, the first that comes back to the sensor, the highest.

A LAS output keeps the records of the points as they are, with the crs of the input.

Parameters

Converts the points of a LAS lidar file into a vector of points, with their elevation, intensity, classification and return number, or into a csv or a new LAS file. The points can be filtered by area, classes, returns and intensity.

Toolbox folder: Vector Processing
Status: Certified
Keywords: Lidar, LAS, Points, Conversion
Authors: Andrea Antonello
Class: org.hortonmachine.modules.LasConverter

Inputs

Parameter

Type

Unit

Default

Description

inFile

LAS file

The LAS file.

inPolygons

vector file

An optional vector of polygons: only the points inside them are kept.

pIntensityrange

String

The range of the intensity of the points to keep, as min,max.

pElevrange

String

The range of the elevation of the points to keep, as min,max.

pImpulses

String

The comma separated list of the returns to keep, as 1 for the first returns, or last for the last return of each pulse.

pClasses

String

The comma separated list of the classes to keep, as 2 for the ground.

pNorth

Double

The optional north boundary of the area to keep.

pSouth

Double

The optional south boundary of the area to keep.

pWest

Double

The optional west boundary of the area to keep.

pEast

Double

The optional east boundary of the area to keep.

doHeader

boolean

false

Only print the header of the file.

doInfo

boolean

false

Only print information about the points of the file.

doBbox

boolean

false

Write the bounding box of the points as a polygon, instead of the points.

Outputs

Parameter

Type

Unit

Description

outFile

output file

The output file: a LAS file (.las), a csv (.csv) or a vector of points (as .shp or .gpkg#layer).

Example

The example runs on the sample lidar survey of the manual, uni_bz_plot777.las in docs/manual/modules/maps/data, a forest plot of 60 x 60 m with its elevation model dtm_777.tif:

import org.hortonmachine.modules.LasConverter

// the folder with the elevation model: change it to yours
var folder = "/data/flanginec/"

// the points of a lidar survey of a forest plot
var converter = new LasConverter()
converter.inFile = folder + "uni_bz_plot777.las"
converter.outFile = folder + "las_points.shp"
converter.process()
The lidar points of the sample plot, colored by their elevation, over the hillshade of its elevation model: the crowns of the trees stand out over the ground, and the scanning lines of the survey cross the plot diagonally.

The lidar points of the sample plot, colored by their elevation, over the hillshade of its elevation model: the crowns of the trees stand out over the ground, and the scanning lines of the survey cross the plot diagonally.