LSDTopoTools
 All Classes Files Functions Variables Friends Pages
Public Member Functions | Protected Attributes | List of all members
LSDTerrace Class Reference

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
 

Detailed Description

Class to store information about floodplains and terraces...

Constructor & Destructor Documentation

LSDTerrace::LSDTerrace ( LSDRaster ChannelRelief,
LSDRaster Slope,
LSDJunctionNetwork ChanNetwork,
LSDFlowInfo FlowInfo,
float  relief_threshold,
float  slope_threshold,
int  min_patch_size,
int  threshold_SO,
int  RemoveChannelThreshold 
)
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.

Author
FJC 18/10/16

Member Function Documentation

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.

Parameters
SwathLSDSwath object
BaselineDistancearray of distance along baseline of each channel
FlowInfoLSDFlowInfo object
Author
FJC
Date
30/11/17
LSDIndexRaster LSDTerrace::get_combined_terraces_and_floodplains_raster ( LSDFloodplain Floodplains)

This function combines the floodplains and terraces into one IndexRaster terraces = 1; floodplains = 2.

Parameters
FloodplainsLSDFloodplain object
Returns
index raster of terrace and floodplain locations
Author
FJC
Date
03/05/17
float LSDTerrace::get_DataResolution ( ) const
inline
Returns
Data resolution as an integer.
map<string,string> LSDTerrace::get_GeoReferencingStrings ( ) const
inline
Returns
Georeferencing information
int LSDTerrace::get_NCols ( ) const
inline
Returns
Number of columns as an integer.
int LSDTerrace::get_NoDataValue ( ) const
inline
Returns
No Data Value as an integer.
int LSDTerrace::get_NRows ( ) const
inline
Returns
Number of rows as an integer.
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.

Parameters
ChanNetworkLSDJunctionNetwork object
FlowInfoLSDFlow info object
ElevationRasterLSDRaster of elevations
DistFromOutletLSDRaster of distance from outlet
threshold_SOthreshold stream order
search_distancesearch distance for channel reach
Author
FJC
Date
21/10/16
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.

Parameters
junction_numberjunction number of interest
ChanNetworkLSDJunctionNetwork object
FlowInfoLSDFlow info object
DistFromOutletLSDRaster of distances from the outlet
ElevationRasterLSDRaster of elevations
Author
FJC
Date
26/10/16
LSDRaster LSDTerrace::get_Terraces_RasterValues ( LSDRaster InputRaster)

This function assigns raster values based on terrace locations.

Parameters
InputRasterInput raster
Returns
raster of terrace locations with assigned raster values
Author
FJC
Date
02/02/17
float LSDTerrace::get_XMinimum ( ) const
inline
Returns
Minimum X coordinate as an integer.
float LSDTerrace::get_YMinimum ( ) const
inline
Returns
Minimum Y coordinate as an integer.
LSDIndexRaster LSDTerrace::print_BinaryRaster ( )

This function prints a binary raster of terrace locations.

Returns
BinaryRaster binary raster
Author
FJC
Date
19/01/17
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

Author
FJC
Date
20/10/16
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

Author
FJC
Date
19/10/16
LSDRaster LSDTerrace::print_ChannelRelief_to_Raster ( )

This function prints the channel relief to a raster.

Returns
ChannelRelief LSDRaster of channel relief
Author
FJC
Date
18/10/16
LSDRaster LSDTerrace::print_ChannelRelief_to_Raster_MainStem ( )

This function prints the channel relief compared to the main stem to a raster.

Returns
MainStemRelief raster of main stem relief
Author
FJC
Date
28/10/16
LSDIndexRaster LSDTerrace::print_ConnectedComponents_to_Raster ( )

FUNCTIONS TO GENERATE RASTERS.

This function prints the connected components array to a raster

Returns
ConnectedComponents connected components raster
Author
FJC
Date
20/10/16
LSDRaster LSDTerrace::print_FlowLengths_to_Raster ( )

This function prints the flow lengths to the nearest main stem to a raster.

Returns
Flow Lengths LSDRaster of flow length
Author
FJC
Date
19/10/16
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.

Parameters
csv_filenamefilename of the csv
ElevationRasterelevation raster
FlowInfoLSDFlowInfo object
SwathLSDSwathProfile object
Author
FJC
Date
28/09/17
void LSDTerrace::print_TerraceWidths_to_csv ( string  csv_filename,
LSDSwath Swath 
)

This function prints terrace widths along the swath to csv.

Parameters
csv_filenamename of csv
Swathswath object
Author
FJC
Date
21/11/17
LSDRaster LSDTerrace::print_UpstreamDistance_to_Raster ( )

This function prints the upstream distance compared of the nearest main stem to a raster.

Returns
UpstreamDist LSDRaster of upstream distance
Author
FJC
Date
19/10/16
LSDRaster LSDTerrace::print_UpstreamDistance_to_Raster_MainStem ( )

This function prints the upstream distance compared of the nearest main stem to a raster.

Returns
UpstreamDist LSDRaster of upstream distance
Author
FJC
Date
28/10/16

Member Data Documentation

vector<int> LSDTerrace::MainStemNodes
protected

Store information for a specified main stem junction vector of nodes on the main stem


The documentation for this class was generated from the following files: