Object to store information about hollows and generate hollow average metrics. More...
#include <LSDHollow.hpp>
Public Member Functions | |
LSDHollow (int Junction, LSDFlowInfo &FlowInfo, LSDJunctionNetwork &ChanNet) | |
Default constructor method used to create a hollow object. More... | |
int | get_NRows () const |
int | get_NCols () const |
float | get_XMinimum () const |
float | get_YMinimum () const |
float | get_DataResolution () const |
int | get_NoDataValue () const |
vector< int > | get_HollowNodes () const |
int | get_NumberOfCells () const |
float | get_Area () const |
int | get_Junction () const |
bool | get_Beheaded () const |
int | get_Outlet_i () const |
int | get_Outlet_j () const |
int | get_Centroid_i () const |
int | get_Centroid_j () const |
float | get_SlopeMean () const |
float | get_ElevationMean () const |
float | get_AspectMean () const |
float | get_ReliefMean () const |
float | get_PlanCurvMean () const |
float | get_ProfileCurvMean () const |
float | get_TotalCurvMean () const |
float | get_PlanCurvMax () const |
float | get_ProfileCurvMax () const |
float | get_TotalCurvMax () const |
vector< int > | get_Perimeter_i () const |
vector< int > | get_Perimeter_j () const |
float | get_CHTMean () const |
float | get_SoilProduction () const |
float | get_BasalAge () const |
float | get_Width () const |
float | get_DownslopeLength () const |
float | get_LongProfileLength () const |
float | CalculateHollowMean (LSDFlowInfo &FlowInfo, LSDRaster Data) |
Calculate the mean value of an LSDRaster which falls inside a hollow. More... | |
float | CalculateHollowMax (LSDFlowInfo &FlowInfo, LSDRaster Data) |
Calculate the max value of an LSDRaster which falls inside a hollow. More... | |
Array2D< float > | get_Raster_Data_For_Hollow (LSDFlowInfo &FlowInfo, LSDRaster Data) |
Return the LSDRaster data from within a hollow as an array. More... | |
Array2D< int > | get_Raster_Data_For_Hollow (LSDFlowInfo &FlowInfo, LSDIndexRaster Data) |
Return the LSDIndexRaster data from within a hollow as an array. More... | |
void | set_SlopeMean (LSDFlowInfo &FlowInfo, LSDRaster Slope) |
Set the mean slope of a hollow. More... | |
void | set_ElevationMean (LSDFlowInfo &FlowInfo, LSDRaster Elevation) |
Set the mean Elevation of a hollow. More... | |
void | set_ReliefMean (LSDFlowInfo &FlowInfo, LSDRaster Relief) |
Set the mean Relief of a hollow. More... | |
void | set_PlanCurvMean (LSDFlowInfo &FlowInfo, LSDRaster PlanCurv) |
Set the mean PlanCurve of a hollow. More... | |
void | set_ProfileCurvMean (LSDFlowInfo &FlowInfo, LSDRaster ProfileCurv) |
Set the mean ProfCurv of a hollow. More... | |
void | set_TotalCurvMean (LSDFlowInfo &FlowInfo, LSDRaster TotalCurv) |
Set the mean TotalCurv of a hollow. More... | |
void | set_PlanCurvMax (LSDFlowInfo &FlowInfo, LSDRaster PlanCurv) |
Set the max PlanCurve of a hollow. More... | |
void | set_ProfileCurvMax (LSDFlowInfo &FlowInfo, LSDRaster ProfileCurv) |
Set the max ProfCurv of a hollow. More... | |
void | set_TotalCurvMax (LSDFlowInfo &FlowInfo, LSDRaster TotalCurv) |
Set the max TotalCurv of a hollow. More... | |
void | set_CHTMean (LSDFlowInfo &FlowInfo, LSDRaster CHT) |
Set the mean hilltop curvature of a hollow. More... | |
void | set_AspectMean (LSDFlowInfo &FlowInfo, LSDRaster Aspect) |
Set the mean aspect of a hollow. More... | |
void | set_Perimeter (LSDFlowInfo &FlowInfo) |
Set the perimeter pixels using a simple edge detection algorithm. More... | |
void | set_SoilProduction (float SoilProdRate) |
Set the Soil production rate. More... | |
void | set_BasalAge (float basal_age) |
Set the basal age. More... | |
void | set_All_Parameters (LSDRaster &Elevation, LSDFlowInfo &FlowInfo, LSDRaster &CHT, LSDRaster &Relief, float window_radius, float SoilProduction=-9999, float BasalAge=-9999) |
Set all of the hollow parameters with one call. More... | |
LSDIndexRaster | write_raster_data_to_LSDIndexRaster (LSDIndexRaster Data, LSDFlowInfo FlowInfo) |
Cookie cut data from an LSDIndexRaster into the shape of the hollow. More... | |
LSDRaster | write_raster_data_to_LSDRaster (LSDRaster Data, LSDFlowInfo FlowInfo) |
Cookie cut data from an LSDRaster into the shape of the hollow. More... | |
LSDRaster | write_real_data_to_LSDRaster (float Param, LSDFlowInfo FlowInfo) |
Write a real value to an LSDRaster in the shape of the hollow. More... | |
LSDIndexRaster | write_integer_data_to_LSDIndexRaster (int Param, LSDFlowInfo FlowInfo) |
Write an integer value to an LSDIndexRaster in the shape of the hollow. More... | |
LSDIndexRaster | write_Junction (LSDFlowInfo FlowInfo) |
Write Junction values into the shape of the hollow. More... | |
LSDIndexRaster | write_NumberOfCells (LSDFlowInfo FlowInfo) |
Write NumberOfCells values into the shape of the hollow. More... | |
LSDRaster | write_Area (LSDFlowInfo FlowInfo) |
Write Area values into the shape of the hollow. More... | |
LSDRaster | write_SlopeMean (LSDFlowInfo FlowInfo) |
Write SlopeMean values into the shape of the hollow. More... | |
LSDRaster | write_ElevationMean (LSDFlowInfo FlowInfo) |
Write ElevationMean values into the shape of the hollow. More... | |
LSDRaster | write_AspectMean (LSDFlowInfo FlowInfo) |
Write AspectMean values into the shape of the hollow. More... | |
LSDRaster | write_ReliefMean (LSDFlowInfo FlowInfo) |
Write ReliefMean values into the shape of the hollow. More... | |
LSDRaster | write_PlanCurvMean (LSDFlowInfo FlowInfo) |
Write PlanCurvMean values into the shape of the hollow. More... | |
LSDRaster | write_ProfileCurvMean (LSDFlowInfo FlowInfo) |
Write ProfileCurvMean values into the shape of the hollow. More... | |
LSDRaster | write_TotalCurvMean (LSDFlowInfo FlowInfo) |
Write TotalCurvMean values into the shape of the hollow. More... | |
LSDRaster | write_PlanCurvMax (LSDFlowInfo FlowInfo) |
Write PlanCurvMax values into the shape of the hollow. More... | |
LSDRaster | write_ProfileCurvMax (LSDFlowInfo FlowInfo) |
Write ProfileCurvMax values into the shape of the hollow. More... | |
LSDRaster | write_TotalCurvMax (LSDFlowInfo FlowInfo) |
Write TotalCurvMax values into the shape of the hollow. More... | |
LSDRaster | write_CHTMean (LSDFlowInfo FlowInfo) |
Write CHTMean values into the shape of the hollow. More... | |
LSDRaster | write_Width (LSDFlowInfo FlowInfo) |
Write Width values into the shape of the hollow. More... | |
void | set_Width (LSDFlowInfo FlowInfo, Array2D< float > FlowDir) |
Calculate the width of a hollow. More... | |
void | set_DownslopeLength (LSDFlowInfo FlowInfo, LSDRaster DEM) |
Calculate the downslope length in the hollow, defined as the D8 flow routing distance from between the maximum elevation point in the hollow to the minimum elevation, or to the edge of the hollow, whichever comes first. More... | |
void | set_LongProfileLength (LSDFlowInfo FlowInfo) |
Measure the long profile length in the hollow, defined as the maximum dimension of the bounding box excluding diagonals. More... | |
Protected Attributes | |
int | NRows |
Number of rows. | |
int | NCols |
Number of columns. | |
float | XMinimum |
Minimum X coordinate. | |
float | YMinimum |
Minimum Y coordinate. | |
float | DataResolution |
Data resolution. | |
int | NoDataValue |
No data value. | |
int | Junction |
Junction Number of the hollow, serves as a unique ID of a hollow. | |
vector< int > | HollowNodes |
Vector of all nodes in hollow. | |
int | NumberOfCells |
Number of DEM cells. | |
float | Area |
Area in spatial units of the hollow. | |
bool | Beheaded |
Boolean to show if the hollow is beheaded or not. | |
int | Outlet_i |
i index of the outlet pixel | |
int | Outlet_j |
j index of the outlet pixel | |
int | Centroid_i |
The i index of the centroid of the hollow. | |
int | Centroid_j |
The j index of the centroid of the hollow. | |
float | SlopeMean |
Mean hollow slope. | |
float | ElevationMean |
Mean hollow elevation. | |
float | AspectMean |
Mean hollow aspect. | |
float | ReliefMean |
Mean hollow relief. | |
float | PlanCurvMean |
Mean hollow planform curvature. | |
float | ProfileCurvMean |
Mean hollow profile curvature. | |
float | TotalCurvMean |
Mean hollow total curvature. | |
float | PlanCurvMax |
Max hollow planform curvature. | |
float | ProfileCurvMax |
Max hollow profile curvature. | |
float | TotalCurvMax |
Max hollow total curvature. | |
vector< int > | Perimeter_i |
Hollow Perimeter's j index. | |
vector< int > | Perimeter_j |
Hollow Perimeter's j index. | |
float | CHTMean |
Mean hollow hilltop curvature. | |
float | SoilProduction |
Soil production rate. | |
float | BasalAge |
Basal age of hollow. | |
float | Width |
Hollow width. | |
float | DownslopeLength |
Downslope length. | |
float | LongProfileLength |
Long Profile Length. | |
Object to store information about hollows and generate hollow average metrics.
|
inline |
Default constructor method used to create a hollow object.
Junction | outlet junction of the hollow to be constructed. |
FlowInfo | LSDFlowInfo object. |
ChanNet | Channel network object. |
float LSDHollow::CalculateHollowMax | ( | LSDFlowInfo & | FlowInfo, |
LSDRaster | Data | ||
) |
Calculate the max value of an LSDRaster which falls inside a hollow.
FlowInfo | Flowinfo object. |
Data | Values to find the max of. |
float LSDHollow::CalculateHollowMean | ( | LSDFlowInfo & | FlowInfo, |
LSDRaster | Data | ||
) |
Calculate the mean value of an LSDRaster which falls inside a hollow.
FlowInfo | Flowinfo object. |
Data | Values to find the mean of. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Array2D< float > LSDHollow::get_Raster_Data_For_Hollow | ( | LSDFlowInfo & | FlowInfo, |
LSDRaster | Data | ||
) |
Return the LSDRaster data from within a hollow as an array.
FlowInfo | Flowinfo object. |
Data | Values to extract. |
Array2D< int > LSDHollow::get_Raster_Data_For_Hollow | ( | LSDFlowInfo & | FlowInfo, |
LSDIndexRaster | Data | ||
) |
Return the LSDIndexRaster data from within a hollow as an array.
FlowInfo | Flowinfo object. |
Data | Values to extract. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void LSDHollow::set_All_Parameters | ( | LSDRaster & | Elevation, |
LSDFlowInfo & | FlowInfo, | ||
LSDRaster & | CHT, | ||
LSDRaster & | Relief, | ||
float | window_radius, | ||
float | SoilProduction = -9999 , |
||
float | BasalAge = -9999 |
||
) |
Set all of the hollow parameters with one call.
Runs polyfit to get the elevation derivatives, so can be quite memory intensive. Method calls all the setters one by one, to populate all the hollow parameters. So a hollow can be created and all it's properties set with 2 calls. The BasalAge and SoilProduction have default parameters of -9999 as these are rarely used variables.
Elevation | LSDRaster of filled elevation values. |
FlowInfo | Flowinfo object. |
CHT | LSDRaster of hilltop curvatures. |
Relief | LSDRaster of the hilltop relief. |
window_radius | Radius in spatial units for the polyft routine. |
SoilProduction | Soil production rate. |
BasalAge | Basal age of the hollow. |
void LSDHollow::set_AspectMean | ( | LSDFlowInfo & | FlowInfo, |
LSDRaster | Aspect | ||
) |
Set the mean aspect of a hollow.
FlowInfo | Flowinfo object. |
Aspect | Values to find the mean of. |
|
inline |
Set the basal age.
BasalAge | Basal age - No sanity check on this value. |
|
inline |
Set the mean hilltop curvature of a hollow.
FlowInfo | Flowinfo object. |
CHT | Values to find the mean of. |
void LSDHollow::set_DownslopeLength | ( | LSDFlowInfo | FlowInfo, |
LSDRaster | DEM | ||
) |
Calculate the downslope length in the hollow, defined as the D8 flow routing distance from between the maximum elevation point in the hollow to the minimum elevation, or to the edge of the hollow, whichever comes first.
FlowInfo | Flowinfo object. |
DEM | An LSDRaster of elevations. |
|
inline |
Set the mean Elevation of a hollow.
FlowInfo | Flowinfo object. |
Elevation | Values to find the mean of. |
void LSDHollow::set_LongProfileLength | ( | LSDFlowInfo | FlowInfo | ) |
Measure the long profile length in the hollow, defined as the maximum dimension of the bounding box excluding diagonals.
FlowInfo | Flowinfo object. |
void LSDHollow::set_Perimeter | ( | LSDFlowInfo & | FlowInfo | ) |
Set the perimeter pixels using a simple edge detection algorithm.
This is quite messy and will be improved soon.
FlowInfo | Flowinfo object. |
|
inline |
Set the max PlanCurve of a hollow.
FlowInfo | Flowinfo object. |
PlanCurv | Values to find the max of. |
|
inline |
Set the mean PlanCurve of a hollow.
FlowInfo | Flowinfo object. |
PlanCurv | Values to find the mean of. |
|
inline |
Set the max ProfCurv of a hollow.
FlowInfo | Flowinfo object. |
ProfileCurv | Values to find the max of. |
|
inline |
Set the mean ProfCurv of a hollow.
FlowInfo | Flowinfo object. |
ProfileCurv | Values to find the mean of. |
|
inline |
Set the mean Relief of a hollow.
FlowInfo | Flowinfo object. |
Relief | Values to find the mean of. |
|
inline |
Set the mean slope of a hollow.
FlowInfo | Flowinfo object. |
Slope | Values to find the mean of. |
|
inline |
Set the Soil production rate.
SoilProdRate | Soil production rate - No sanity check on this value. |
|
inline |
Set the max TotalCurv of a hollow.
FlowInfo | Flowinfo object. |
TotalCurv | Values to find the max of. |
|
inline |
Set the mean TotalCurv of a hollow.
FlowInfo | Flowinfo object. |
TotalCurv | Values to find the mean of. |
void LSDHollow::set_Width | ( | LSDFlowInfo | FlowInfo, |
Array2D< float > | FlowDir | ||
) |
Calculate the width of a hollow.
FlowInfo | Flowinfo object. |
FlowDir | D infinity flow directions. |
|
inline |
Write Area values into the shape of the hollow.
FlowInfo | Flowinfo object. |
|
inline |
Write AspectMean values into the shape of the hollow.
FlowInfo | Flowinfo object. |
|
inline |
Write CHTMean values into the shape of the hollow.
FlowInfo | Flowinfo object. |
|
inline |
Write ElevationMean values into the shape of the hollow.
FlowInfo | Flowinfo object. |
LSDIndexRaster LSDHollow::write_integer_data_to_LSDIndexRaster | ( | int | Param, |
LSDFlowInfo | FlowInfo | ||
) |
Write an integer value to an LSDIndexRaster in the shape of the hollow.
Param | integer value to be written |
FlowInfo | Flowinfo object. |
|
inline |
Write Junction values into the shape of the hollow.
FlowInfo | Flowinfo object. |
|
inline |
Write NumberOfCells values into the shape of the hollow.
FlowInfo | Flowinfo object. |
|
inline |
Write PlanCurvMax values into the shape of the hollow.
FlowInfo | Flowinfo object. |
|
inline |
Write PlanCurvMean values into the shape of the hollow.
FlowInfo | Flowinfo object. |
|
inline |
Write ProfileCurvMax values into the shape of the hollow.
FlowInfo | Flowinfo object. |
|
inline |
Write ProfileCurvMean values into the shape of the hollow.
FlowInfo | Flowinfo object. |
LSDIndexRaster LSDHollow::write_raster_data_to_LSDIndexRaster | ( | LSDIndexRaster | Data, |
LSDFlowInfo | FlowInfo | ||
) |
Cookie cut data from an LSDIndexRaster into the shape of the hollow.
Data | LSDIndexRaster data to be written. |
FlowInfo | Flowinfo object. |
LSDRaster LSDHollow::write_raster_data_to_LSDRaster | ( | LSDRaster | Data, |
LSDFlowInfo | FlowInfo | ||
) |
LSDRaster LSDHollow::write_real_data_to_LSDRaster | ( | float | Param, |
LSDFlowInfo | FlowInfo | ||
) |
|
inline |
Write ReliefMean values into the shape of the hollow.
FlowInfo | Flowinfo object. |
|
inline |
Write SlopeMean values into the shape of the hollow.
FlowInfo | Flowinfo object. |
|
inline |
Write TotalCurvMax values into the shape of the hollow.
FlowInfo | Flowinfo object. |
|
inline |
Write TotalCurvMean values into the shape of the hollow.
FlowInfo | Flowinfo object. |
|
inline |
Write Width values into the shape of the hollow.
FlowInfo | Flowinfo object. |