Class to store information about floodplains and terraces... More...
#include <LSDTerrace.hpp>
Public Member Functions | |
LSDTerrace (LSDRaster &ChannelRelief, LSDRaster &Slope, LSDJunctionNetwork &ChanNetwork, LSDFlowInfo &FlowInfo, float relief_threshold, float slope_threshold, int min_patch_size, int threshold_SO, int RemoveChannelThreshold) | |
create function 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 |
map< string, string > | get_GeoReferencingStrings () const |
void | Get_Relief_of_Nearest_Channel (LSDJunctionNetwork &ChanNetwork, LSDFlowInfo &FlowInfo, LSDRaster &ElevationRaster, LSDRaster &DistFromOutlet, int threshold_SO, int search_distance) |
This function gets the elevation of the nearest channel reach to each patch. More... | |
void | get_terraces_along_main_stem (int junction_number, LSDJunctionNetwork &ChanNetwork, LSDFlowInfo &FlowInfo, LSDRaster &DistFromOutlet) |
This function gets the information about all the floodplain pixels connected to the main stem channel from a junction. More... | |
void | print_TerraceWidths_to_csv (string csv_filename, LSDSwath &Swath) |
This function prints terrace widths along the swath to csv. More... | |
Array2D< int > | get_ChannelNodeArray (LSDSwath &Swath, Array2D< float > BaselineDistance, LSDFlowInfo &FlowInfo) |
This function gets the nearest channel node on the baseline to each terrace pixel. More... | |
LSDIndexRaster | print_ConnectedComponents_to_Raster () |
FUNCTIONS TO GENERATE RASTERS. More... | |
LSDRaster | print_ChannelRelief_to_Raster () |
This function prints the channel relief to a raster. More... | |
LSDRaster | print_ChannelRelief_to_Raster_MainStem () |
This function prints the channel relief compared to the main stem to a raster. More... | |
LSDRaster | print_UpstreamDistance_to_Raster () |
This function prints the upstream distance compared of the nearest main stem to a raster. More... | |
LSDRaster | print_UpstreamDistance_to_Raster_MainStem () |
This function prints the upstream distance compared of the nearest main stem to a raster. More... | |
LSDRaster | print_FlowLengths_to_Raster () |
This function prints the flow lengths to the nearest main stem to a raster. More... | |
LSDIndexRaster | print_BinaryRaster () |
This function prints a binary raster of terrace locations. More... | |
LSDRaster | get_Terraces_RasterValues (LSDRaster &InputRaster) |
This function assigns raster values based on terrace locations. More... | |
LSDIndexRaster | get_combined_terraces_and_floodplains_raster (LSDFloodplain &Floodplains) |
This function combines the floodplains and terraces into one IndexRaster terraces = 1; floodplains = 2. More... | |
void | print_ChannelRelief_to_File (string filename) |
FUNCTIONS TO PRINT TEXT FILES. More... | |
void | print_Binned_ChannelRelief_to_File (string filename, float &bin_width, float &bin_lower_limit, float &bin_threshold) |
This function prints the binned upstream distance and channel relief of all the CC pixels to a text file. More... | |
void | print_TerraceAreas_to_file (string filename, LSDFlowInfo &FlowInfo) |
void | print_TerraceInfo_to_csv (string csv_filename, LSDRaster &ElevationRaster, LSDRaster &ChannelRelief, LSDFlowInfo &FlowInfo, LSDSwath &Swath) |
This function prints information about each terrace pixel to a csv file. More... | |
Protected Attributes | |
int | NRows |
Number of rows. | |
int | NCols |
Number of columns. | |
float | XMinimum |
X minimum. | |
float | YMinimum |
Y minimum. | |
float | DataResolution |
Data resolution. | |
int | NoDataValue |
No data value. | |
map< string, string > | GeoReferencingStrings |
A map of strings for holding georeferencing information. | |
float | relief_threshold |
Relief threshold. | |
float | slope_threshold |
Slope threshold. | |
Array2D< int > | BinaryArray |
The binary array of terrace data. | |
Array2D< int > | ConnectedComponents_Array |
The array of connected components. | |
Array2D< float > | NearestChannelElev_array |
Array of nearest channel elevations. | |
Array2D< int > | NearestChannelNode_array |
Array of nearest channel node indices. | |
Array2D< float > | ChannelRelief_array |
Array of relief to the nearest channel. | |
Array2D< float > | UpstreamDist_array |
Array of distance upstream of nearest channel. | |
vector< int > | TerraceNodes |
vector of terrace nodes | |
Array2D< int > | TerraceNodes_array |
array of terrace nodes | |
vector< int > | TerraceIDs |
vector of terrace IDs, unique values from the connected components array | |
vector< int > | MainStemNodes |
vector< float > | UpstreamDist |
vector of distance upstream for every pixel connected to the main stem | |
vector< float > | ChannelRelief |
vector of channel relief for every pixel connected to the main stem | |
Array2D< float > | MainStemRelief_array |
array of main stem relief | |
Array2D< float > | MainStemDist_array |
array of main stem distance | |
Class to store information about floodplains and terraces...
|
inline |
create function
This populates the binary array and connected components array for the terraces given rasters of channel relief and slope and thresholds for both. Each pixel must be below the slope and channel relief threshold to be classified as a terrace pixel.
Array2D< int > LSDTerrace::get_ChannelNodeArray | ( | LSDSwath & | Swath, |
Array2D< float > | BaselineDistance, | ||
LSDFlowInfo & | FlowInfo | ||
) |
This function gets the nearest channel node on the baseline to each terrace pixel.
Swath | LSDSwath object |
BaselineDistance | array of distance along baseline of each channel |
FlowInfo | LSDFlowInfo object |
LSDIndexRaster LSDTerrace::get_combined_terraces_and_floodplains_raster | ( | LSDFloodplain & | Floodplains | ) |
This function combines the floodplains and terraces into one IndexRaster terraces = 1; floodplains = 2.
Floodplains | LSDFloodplain object |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void LSDTerrace::Get_Relief_of_Nearest_Channel | ( | LSDJunctionNetwork & | ChanNetwork, |
LSDFlowInfo & | FlowInfo, | ||
LSDRaster & | ElevationRaster, | ||
LSDRaster & | DistFromOutlet, | ||
int | threshold_SO, | ||
int | search_distance | ||
) |
This function gets the elevation of the nearest channel reach to each patch.
For each pixel this function finds the nearest channel to a patch greater than a threshold stream order
Terraces - calculates the mean elevation of a reach defined by this channel and gets the elevation of each pixel compared to this reach. Floodplains - gets the elevation of the nearest channel pixel.
ChanNetwork | LSDJunctionNetwork object |
FlowInfo | LSDFlow info object |
ElevationRaster | LSDRaster of elevations |
DistFromOutlet | LSDRaster of distance from outlet |
threshold_SO | threshold stream order |
search_distance | search distance for channel reach |
void LSDTerrace::get_terraces_along_main_stem | ( | int | junction_number, |
LSDJunctionNetwork & | ChanNetwork, | ||
LSDFlowInfo & | FlowInfo, | ||
LSDRaster & | DistFromOutlet | ||
) |
This function gets the information about all the floodplain pixels connected to the main stem channel from a junction.
Takes a junction number and generates the main stem channel from this point. THe information about each floodplain or terrace pixel is then calculated relative to the main channel.
junction_number | junction number of interest |
ChanNetwork | LSDJunctionNetwork object |
FlowInfo | LSDFlow info object |
DistFromOutlet | LSDRaster of distances from the outlet |
ElevationRaster | LSDRaster of elevations |
This function assigns raster values based on terrace locations.
InputRaster | Input raster |
|
inline |
|
inline |
LSDIndexRaster LSDTerrace::print_BinaryRaster | ( | ) |
This function prints a binary raster of terrace locations.
void LSDTerrace::print_Binned_ChannelRelief_to_File | ( | string | filename, |
float & | bin_width, | ||
float & | bin_lower_limit, | ||
float & | bin_threshold | ||
) |
This function prints the binned upstream distance and channel relief of all the CC pixels to a text file.
The format is: mean_distance st_dev_distance st_err_distance mean_relief st_dev_relief st_err_relief
void LSDTerrace::print_ChannelRelief_to_File | ( | string | filename | ) |
FUNCTIONS TO PRINT TEXT FILES.
This function prints the upstream distance and channel relief of the floodplain pixels to a text file
LSDRaster LSDTerrace::print_ChannelRelief_to_Raster | ( | ) |
This function prints the channel relief to a raster.
LSDRaster LSDTerrace::print_ChannelRelief_to_Raster_MainStem | ( | ) |
This function prints the channel relief compared to the main stem to a raster.
LSDIndexRaster LSDTerrace::print_ConnectedComponents_to_Raster | ( | ) |
FUNCTIONS TO GENERATE RASTERS.
This function prints the connected components array to a raster
LSDRaster LSDTerrace::print_FlowLengths_to_Raster | ( | ) |
This function prints the flow lengths to the nearest main stem to a raster.
void LSDTerrace::print_TerraceInfo_to_csv | ( | string | csv_filename, |
LSDRaster & | ElevationRaster, | ||
LSDRaster & | ChannelRelief, | ||
LSDFlowInfo & | FlowInfo, | ||
LSDSwath & | Swath | ||
) |
This function prints information about each terrace pixel to a csv file.
csv_filename | filename of the csv |
ElevationRaster | elevation raster |
FlowInfo | LSDFlowInfo object |
Swath | LSDSwathProfile object |
void LSDTerrace::print_TerraceWidths_to_csv | ( | string | csv_filename, |
LSDSwath & | Swath | ||
) |
This function prints terrace widths along the swath to csv.
csv_filename | name of csv |
Swath | swath object |
LSDRaster LSDTerrace::print_UpstreamDistance_to_Raster | ( | ) |
This function prints the upstream distance compared of the nearest main stem to a raster.
LSDRaster LSDTerrace::print_UpstreamDistance_to_Raster_MainStem | ( | ) |
This function prints the upstream distance compared of the nearest main stem to a raster.
|
protected |
Store information for a specified main stem junction vector of nodes on the main stem