LasHistogram

LasHistogram counts the points of a LAS file by their intensity, elevation or classification, in bins of equal width between the minimum and the maximum. The histogram is printed, shown in a chart window and written to a csv file. It is the first look at a survey: the intensity to choose the thresholds of LasThresholder, the elevation to see the layers of the vegetation.

Details

The file is read twice: first for the range of the value, then to count the points in each bin. The bins and their counts are printed, shown in a chart window and, if the output file is given, written to a csv file with the center of each bin and its count of points.

The histogram of the intensity helps to choose the thresholds of LasThresholder, the one of the elevation shows the vertical structure of the survey, as the layers of a forest. The classification has only a few values, as 1 unclassified, 2 ground and 3 low vegetation: use as many bins as the classes.

Parameters

Creates the histogram of the intensity, elevation or classification of the points of a las file.

Toolbox folder: Lesto › filter
Status: Experimental
Keywords: las, histogram
Authors: Andrea Antonello
Class: org.hortonmachine.lesto.modules.filter.LasHistogram

Inputs

Parameter

Type

Unit

Default

Description

inLas

LAS file

The las file to analyze.

pBin

int

100

The number of bins, of equal width between the minimum and the maximum of the value.

doPlot

boolean

true

If true, the histogram is shown in a chart window.

pType

String

intensity

The value of the points to analyze. Allowed values: intensity, elev, classificazione.

Outputs

Parameter

Type

Unit

Description

outCsv

output file

The optional output csv file of the histogram: the center of each bin and its count of points.

Example

The histogram of the intensity of the sample survey, in 30 bins, written to a table:

import org.hortonmachine.lesto.modules.filter.LasHistogram

// the folder with the lidar survey: change it to yours
var folder = "/data/flanginec/"

// the histogram of the intensity of the points, in 30 bins, written as a table
var histogram = new LasHistogram()
histogram.inLas = folder + "uni_bz_plot777.las"
histogram.pType = "intensity"
histogram.pBin = 30
histogram.doPlot = false
histogram.outCsv = folder + "las_intensity.csv"
histogram.process()
The histogram of the intensity of the sample survey: most points between 0 and 220, with a peak around 170, and very few brighter points up to 420.

The histogram of the intensity of the sample survey: most points between 0 and 220, with a peak around 170, and very few brighter points up to 420.