mounts module¶
Module for delineating the nested hierarchy of elevated features (i.e., mounts).
DelineateMounts(in_dem, min_size, min_height, interval, out_dir, bool_shp=False)
¶
Delineates the nested hierarchy of elevated features (i.e., mounts).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
in_dem |
str
|
File path to the input DEM. |
required |
min_size |
int
|
The minimum number of pixels to be considered as an object. |
required |
min_height |
float
|
The minimum depth of the feature to be considered as an object. |
required |
interval |
float
|
The slicing interval. |
required |
out_dir |
str
|
The output directory. |
required |
bool_shp |
bool
|
Whether to generate shapefiles. Defaults to False. |
False
|
Returns:
Name | Type | Description |
---|---|---|
tuple |
File paths to the depression ID and level. |
Source code in lidar/mounts.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
FlipDEM(dem, delta=100, out_file=None)
¶
Flips the DEM.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dem |
array
|
The numpy array containing the image. |
required |
delta |
int
|
The base value to be added to the flipped DEM. Defaults to 100. |
100
|
out_file |
str
|
File path to the output image. Defaults to None. |
None
|
Returns:
Type | Description |
---|---|
np.array: The numpy array containing the flipped DEM. |
Source code in lidar/mounts.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
get_min_max_nodata(dem)
¶
Gets the minimum, maximum, and no_data value of a numpy array.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dem |
array
|
The numpy array containing the image. |
required |
Returns:
Name | Type | Description |
---|---|---|
tuple |
The minimum, maximum, and no_data value. |
Source code in lidar/mounts.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|