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

Class to store information about floodplains and terraces... More...

#include <LSDFloodplain.hpp>

Public Member Functions

 LSDFloodplain (LSDRaster &ChannelRelief, LSDRaster &Slope, LSDJunctionNetwork &ChanNetwork, LSDFlowInfo &FlowInfo, float relief_threshold, float slope_threshold, int min_patch_size, int threshold_SO)
 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)
 This function gets the elevation of the nearest channel reach to each patch. More...
 
void get_distance_upstream_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...
 
LSDIndexRaster print_ConnectedComponents_to_Raster ()
 FUNCTIONS TO GENERATE RASTERS. More...
 
LSDIndexRaster print_BinaryRaster ()
 This function prints a binary raster of floodplain locations. More...
 
LSDRaster print_ChannelRelief_to_Raster ()
 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_FlowLengths_to_Raster ()
 This function prints the flow lengths to the nearest main stem to a raster. 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...
 
Array2D< int > get_FloodplainArray () const
 This function returns the array of floodplain nodes. 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 floodplain 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 > FloodplainNodes
 
Array2D< int > FloodplainNodes_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
 

Detailed Description

Class to store information about floodplains and terraces...

Constructor & Destructor Documentation

LSDFloodplain::LSDFloodplain ( LSDRaster ChannelRelief,
LSDRaster Slope,
LSDJunctionNetwork ChanNetwork,
LSDFlowInfo FlowInfo,
float  relief_threshold,
float  slope_threshold,
int  min_patch_size,
int  threshold_SO 
)
inline

create function

This populates the binary array and connected components array for the floodplain 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 floodplain.

Author
FJC 18/10/16

Member Function Documentation

float LSDFloodplain::get_DataResolution ( ) const
inline
Returns
Data resolution as an integer.
void LSDFloodplain::get_distance_upstream_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
Array2D<int> LSDFloodplain::get_FloodplainArray ( ) const
inline

This function returns the array of floodplain nodes.

Author
FJC
Date
03/05/17
map<string,string> LSDFloodplain::get_GeoReferencingStrings ( ) const
inline
Returns
Georeferencing information
int LSDFloodplain::get_NCols ( ) const
inline
Returns
Number of columns as an integer.
int LSDFloodplain::get_NoDataValue ( ) const
inline
Returns
No Data Value as an integer.
int LSDFloodplain::get_NRows ( ) const
inline
Returns
Number of rows as an integer.
void LSDFloodplain::Get_Relief_of_Nearest_Channel ( LSDJunctionNetwork ChanNetwork,
LSDFlowInfo FlowInfo,
LSDRaster ElevationRaster,
LSDRaster DistFromOutlet,
int  threshold_SO 
)

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
float LSDFloodplain::get_XMinimum ( ) const
inline
Returns
Minimum X coordinate as an integer.
float LSDFloodplain::get_YMinimum ( ) const
inline
Returns
Minimum Y coordinate as an integer.
LSDIndexRaster LSDFloodplain::print_BinaryRaster ( )

This function prints a binary raster of floodplain locations.

Returns
BinaryRaster binary raster
Author
FJC
Date
24/11/16
void LSDFloodplain::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 LSDFloodplain::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 LSDFloodplain::print_ChannelRelief_to_Raster ( )

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

Returns
ChannelRelief LSDRaster of channel relief
Author
FJC
Date
18/10/16
LSDIndexRaster LSDFloodplain::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 LSDFloodplain::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
LSDRaster LSDFloodplain::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

Member Data Documentation

vector<int> LSDFloodplain::FloodplainNodes
protected

vectors to separate floodplain and terrace nodes vector of floodplain nodes

vector<int> LSDFloodplain::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: