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

This object holds information on the Strahler links in a channel network whereas the LSDJunctionNetwork object stores every junction, this object stores information about the links that connect different strahelr orders: e.g. every 1st order channel, every 2nd order channel, etc. More...

#include <LSDStrahlerLinks.hpp>

Public Member Functions

 LSDStrahlerLinks ()
 This defines a Strahler links object, is empty. More...
 
 LSDStrahlerLinks (LSDJunctionNetwork &JNetwork, LSDFlowInfo &FlowInfo)
 This creates the LSDStrahlerLinks object. More...
 
void populate_NodeRowCol_vecvecs (LSDJunctionNetwork &JNetwork, LSDFlowInfo &FlowInfo)
 this function is called during the create process it populates the node, row and col vectors with information about the location of the source and receiver node, row and column More...
 
void calculate_drops (LSDFlowInfo &FlowInfo, LSDRaster &topo_raster)
 this function calculates the drops for each link More...
 
void calculate_link_area (LSDFlowInfo &FlowInfo)
 this function calculates drainage area of each link More...
 
void print_drops (string data_directory, string DEM_name)
 this function prints drops. Modified FJC 25/03/16. More...
 
LSDIndexRaster get_no_edge_influence_mask (LSDFlowInfo &FI, LSDIndexRaster &Influence_Mask)
 this function calculates calcualtes which basins contain nodes that receive flow from nodes on edge or adjacent to nodata and masks these basins. More...
 
LSDRaster get_no_edge_influence_raster (LSDFlowInfo &FI, LSDRaster &topography)
 This is a one stop function that masks out all pixels that are in basins receiving flow from pixels either on the edge or adjacent to nodata. More...
 
void print_number_of_streams (string data_directory, string DEM_name)
 Function to print the number of streams of each order. More...
 
void calculate_lengths (LSDFlowInfo &FlowInfo)
 Function to calculate the length of each link of each order. More...
 
void print_lengths (string data_directory, string DEM_name)
 this function prints the lengths. Creates a different file for each stream order. 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.
 
map< string, string > GeoReferencingStrings
 A map of strings for holding georeferencing information.
 
vector< vector< int > > SourceJunctions
 a vec vec containing the sources of all the Strahler links
 
vector< vector< int > > ReceiverJunctions
 a vec vec containing the end junctions of the Strahler links
 
vector< vector< int > > SourceNodes
 a vec vec containing the node indices of the sources
 
vector< vector< int > > SourceRows
 a vec vec containing the rows of the sources
 
vector< vector< int > > SourceCols
 a vec vec containing the cols of the sources
 
vector< vector< int > > ReceiverNodes
 
vector< vector< int > > ReceiverRows
 
vector< vector< int > > ReceiverCols
 
vector< vector< float > > DropData
 a vec vec containing drops of every link
 
vector< vector< float > > LengthData
 a vec vec containing lengths of every link - added FJC 24/03/16
 

Detailed Description

This object holds information on the Strahler links in a channel network whereas the LSDJunctionNetwork object stores every junction, this object stores information about the links that connect different strahelr orders: e.g. every 1st order channel, every 2nd order channel, etc.

Author
SMM
Date
28/10/2014

Constructor & Destructor Documentation

LSDStrahlerLinks::LSDStrahlerLinks ( )
inline

This defines a Strahler links object, is empty.

Author
SMM
Date
26/10/14
LSDStrahlerLinks::LSDStrahlerLinks ( LSDJunctionNetwork JNetwork,
LSDFlowInfo FlowInfo 
)
inline

This creates the LSDStrahlerLinks object.

Parameters
JNetworka LSDJunctionNetwork object
FlowInfoLSDFlowInfo object.
Author
SMM
Date
26/10/14

Member Function Documentation

void LSDStrahlerLinks::calculate_drops ( LSDFlowInfo FlowInfo,
LSDRaster topo_raster 
)

this function calculates the drops for each link

Parameters
FlowInfoLSDFlowInfo object
topo_rasterLSDRaster object that contains the elevations.
Author
SMM
Date
28/10/14
void LSDStrahlerLinks::calculate_lengths ( LSDFlowInfo FlowInfo)

Function to calculate the length of each link of each order.

Parameters
FlowInfoLSDFlowInfo object
Author
FJC and MAH
Date
24/03/16
void LSDStrahlerLinks::calculate_link_area ( LSDFlowInfo FlowInfo)

this function calculates drainage area of each link

Parameters
FlowInfoLSDFlowInfo object
Author
SMM
Date
28/10/14
LSDIndexRaster LSDStrahlerLinks::get_no_edge_influence_mask ( LSDFlowInfo FI,
LSDIndexRaster Influence_Mask 
)

this function calculates calcualtes which basins contain nodes that receive flow from nodes on edge or adjacent to nodata and masks these basins.

Parameters
FIthe LSDFlowInfo object
InfluenceMaskLSDIndexRaster a mask raster that holds the cells that receive flow from the edge. This is generated using the LSDFlowInfo member function find_cells_influenced_by_nodata
Returns
NotIfluencedByEdgeOrNoData an LSDIndexRaster that has values 0 for cells that receive flow from an edge or nodata cell, and 1 for cells that do not receive flow from edge or nodata-adjacent cells
Author
SMM
Date
01/11/2014
LSDRaster LSDStrahlerLinks::get_no_edge_influence_raster ( LSDFlowInfo FI,
LSDRaster topography 
)

This is a one stop function that masks out all pixels that are in basins receiving flow from pixels either on the edge or adjacent to nodata.

Parameters
FIthe LSDFlowInfo object
InfluenceMaskLSDIndexRaster a mask raster that holds the cells that receive flow from the edge. This is generated using the LSDFlowInfo member function find_cells_influenced_by_nodata
Returns
NotIfluencedByEdgeOrNoData an LSDIndexRaster that has values 0 for cells that receive flow from an edge or nodata cell, and 1 for cells that do not receive flow from edge or nodata-adjacent cells
Author
SMM
Date
01/11/2014
void LSDStrahlerLinks::populate_NodeRowCol_vecvecs ( LSDJunctionNetwork JNetwork,
LSDFlowInfo FlowInfo 
)

this function is called during the create process it populates the node, row and col vectors with information about the location of the source and receiver node, row and column

Parameters
JNetworka LSDJunctionNetwork object
FlowInfoLSDFlowInfo object.
Author
SMM
Date
28/10/14
void LSDStrahlerLinks::print_drops ( string  data_directory,
string  DEM_name 
)

this function prints drops. Modified FJC 25/03/16.

Parameters
data_directorya string containing the data dierctory. Should be terminated with a slash
DEM_namea string that is used to identify the file (typically this will be the name of the DEM)
Author
SMM
Date
28/10/14
void LSDStrahlerLinks::print_lengths ( string  data_directory,
string  DEM_name 
)

this function prints the lengths. Creates a different file for each stream order.

Parameters
data_directorya string containing the data dierctory. Should be terminated with a slash
DEM_namea string that is used to identify the file (typically this will be the name of the DEM)
Author
FJC
Date
25/03/16
void LSDStrahlerLinks::print_number_of_streams ( string  data_directory,
string  DEM_name 
)

Function to print the number of streams of each order.

Parameters
data_directorydirectory to print file to
DEM_namestring to identify the file (e.g. the name of the DEM)
Author
FJC and MAH
Date
17/03/16

Member Data Documentation

vector< vector<int> > LSDStrahlerLinks::ReceiverCols
protected

a vec vec containing the cols of the receivers note: this does not extend to the junction of higher order: it stops on the last pixel of the channel of this order

vector< vector<int> > LSDStrahlerLinks::ReceiverNodes
protected

a vec vec containing the node indices of the receivers note: this does not extend to the junction of higher order: it stops on the last pixel of the channel of this order

vector< vector<int> > LSDStrahlerLinks::ReceiverRows
protected

a vec vec containing the rows of the receivers note: this does not extend to the junction of higher order: it stops on the last pixel of the channel of this order


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