RasterMaximaFinder¶
RasterMaximaFinder finds the tops of the trees in a canopy height model, as its local maxima: the cells higher than all the others of a window around them. The window can be of a fixed size, or as wide as the crown expected for a tree of the height of the cell, so that a tall tree is not split into several tops and two small ones are not merged into one. GeomorphonMaximaFinder finds them from the shape of the surface, PointCloudMaximaFinder from the points themselves, and WatershedAlgorithm draws the crowns around them.
Details¶
A cell of the canopy height model is a maximum when no cell of its window is higher; cells of the same height in the same window are all maxima. The window is square, or circular with doCircular, and at least of 3 x 3 cells.
In custom mode the window has the given size in cells everywhere. In the other modes it is as wide as the crown expected for a tree of the height of the cell, from the regressions of Popescu and Wynne (2004) of the crown width CW on the height H, in meters:
mixed pines and deciduous trees: CW = 2.51503 + 0.00901 H²;
deciduous trees: CW = 3.09632 + 0.00895 H²;
conifers, the pines of the study: CW = 3.75105 + 0.17919 H + 0.01241 H².
The width is reduced to the given percentage, as the crowns of neighbouring trees overlap, and limited to twice the maximum radius: a 20 m tree of a mixed forest, with a crown of 6.1 m, gets a window of 3.7 m at 60%. A window larger than half the width of the raster stops the module.
Of the maxima, the ones lower than the threshold are left out, as the ground and the shrubs, and so are those with more than one neighbour without value, unless allowed: the neighbours outside of the raster count as without value, so the cells on its border are never maxima. The spikes are left out too, with at least the given number of neighbours lower than them by more than the top buffer threshold. With the border distance, the remaining maxima near the border of the canopy over the threshold get a note in the output, without being removed.
Parameters¶
Finds the tops of the trees as the local maxima of a canopy height model, in a window of fixed size or as wide as the crowns expected for the height.
Toolbox folder: Lesto › vegetation
Status: Experimental
Keywords: Raster, Maxima, Trees, Lidar
Authors: Andrea Antonello, Silvia Franceschi
Class: org.hortonmachine.modules.RasterMaximaFinder
Inputs
Parameter |
Type |
Unit |
Default |
Description |
|---|---|---|---|---|
|
raster file |
The canopy height model: the height of the surface over the ground. |
||
|
String |
|
The window: custom, of the given size in cells, or as wide as the crowns of mixed_pines_and_deciduous_trees, deciduous or conifer trees of the height of the cell. Allowed values: |
|
|
double |
|
Threshold on maxima. Only maxima higher than the threshold are kept. |
|
|
int |
|
The windows size in cells to use for custom mode (default is 3). |
|
|
int |
|
The percentage of the crown width used as window (default is 60%). This is ignored in custom mode. |
|
|
double |
|
The maximum radius of the window, in meters. This is ignored in custom mode. |
|
|
boolean |
|
Use a circular window instead of a square one, for windows larger than 3 cells. |
|
|
boolean |
|
If false, a maximum with more than one novalue among its 8 neighbours is discarded. |
|
|
double |
m |
|
If larger than 0, the maxima closer than this to the border of the canopy over the threshold get a note, as near a border, but are kept. |
|
double |
m |
|
The drop of a neighbour from the maximum over which it counts for the spikes. |
|
int |
|
The number of neighbours lower than the top buffer threshold that make a maximum a spike, to discard; 0 disables the check. |
Outputs
Parameter |
Type |
Unit |
Description |
|---|---|---|---|
|
output file |
The maxima, with an id, their height (elev) and a note. |
|
|
output file |
The windows of the maxima, as circles, with the id of the maximum (id_maxima) and their area. |
References
Popescu, S. C., Wynne, R. H. (2004). Seeing the trees in the forest: using lidar and multispectral data fusion with local filtering and variable window size for estimating tree height. Photogrammetric Engineering & Remote Sensing, 70(5), 589-604.
Example¶
The tops of the trees of the canopy height model of Las2RasterInterpolator, higher than 5 m, with the windows of mixed forests:
import org.hortonmachine.modules.RasterMaximaFinder
// the folder with the lidar survey: change it to yours
var folder = "/data/flanginec/"
// the tops of the trees in the canopy height model of Las2RasterInterpolator,
// with a window that grows with the height as the crowns of mixed forests
var finder = new RasterMaximaFinder()
finder.inDsmDtmDiff = folder + "chm_idw.tif"
finder.pMode = "mixed_pines_and_deciduous_trees"
finder.pThreshold = 5.0
finder.outMaxima = folder + "tops_raster.shp"
finder.outCircles = folder + "tops_raster_windows.shp"
finder.process()
The 191 tops, red dots, each in the blue circle of its window, over the canopy height model in green: a top in almost every crown, the larger circles on the taller trees, a few crowns with two tops.¶