LasElevationHandler¶
LasElevationHandler normalizes a LAS file over an elevation model: the elevation of the ground under each point is subtracted from it, and the points get their height over the ground instead of their elevation. With doAdd it does the opposite, bringing the heights of a normalized file back to elevations.
Details¶
The elevation of the cell of the elevation model that contains each point, without interpolation, is subtracted from the elevation of the point, which becomes its height over the ground, or added to it, to bring the heights of a normalized file back to elevations.
The points outside of the elevation model, or on its cells without value, are left out, and their number is reported. All the other attributes of the points are kept; the header gets the bounds of the new values.
A normalized file is the input of the modules that work on the heights over the ground without an elevation model, as a canopy height model interpolated from the points.
Parameters¶
Normalizes the points of a las file over an elevation model, turning their elevations into heights over the ground, or the other way around.
Toolbox folder: Lesto › utilities
Status: Experimental
Keywords: las, dem
Authors: Andrea Antonello
Class: org.hortonmachine.lesto.modules.utilities.LasElevationHandler
Inputs
Parameter |
Type |
Unit |
Default |
Description |
|---|---|---|---|---|
|
LAS file |
The las file to handle. |
||
|
raster file |
The elevation model of the ground. |
||
|
boolean |
|
If set to true, the dtm value is added to the las elevation, instead of subtracted. |
Outputs
Parameter |
Type |
Unit |
Description |
|---|---|---|---|
|
output file |
The normalized las file. |
Example¶
The heights over the ground of the points of the sample survey, converted to a vector by LasConverter to see them on a map:
import org.hortonmachine.lesto.modules.utilities.LasElevationHandler
import org.hortonmachine.modules.LasConverter
// the folder with the lidar survey: change it to yours
var folder = "/data/flanginec/"
// the heights of the points over the ground: the elevation model subtracted from them
var handler = new LasElevationHandler()
handler.inFile = folder + "uni_bz_plot777.las"
handler.inDtm = folder + "dtm_777.tif"
handler.outFile = folder + "las_heights.las"
handler.process()
// the normalized points as a vector, to see them on a map
var converter = new LasConverter()
converter.inFile = folder + "las_heights.las"
converter.outFile = folder + "las_heights.shp"
converter.process()
The normalized points colored by their height over the ground, from -0.3 m, the ground points just under the elevation model, in white to 21.6 m in dark green: the crowns of the trees stand out over the ground, which is white everywhere, also along the slope of the plot.¶
The 8 points just outside of the elevation model are left out.