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

This object packages a number of tools for chi analysis. More...

#include <LSDGeometry.hpp>

Inheritance diagram for LSDPolyline:
LSDGeometry

Public Member Functions

 LSDPolyline (vector< double > x, vector< double > y)
 Create with two vectors: no UTM provided so assumed lat/long The X should be Longitude the Y vector should be latitude. More...
 
 LSDPolyline (vector< float > x, vector< float > y)
 Create with two vectors: no UTM provided so assumed lat/long The X should be Longitude the Y vector should be latitude. More...
 
 LSDPolyline (vector< double > x, vector< double > y, int UTMZone)
 Create with two vectors. UTM info provided The X should be Easting or Longitude the Y vector should be Northing This version assumes northern hemisphere. More...
 
 LSDPolyline (vector< float > x, vector< float > y, int UTMZone)
 Create with two vectors. UTM info provided The X should be Easting or Longitude the Y vector should be Northing This version assumes northern hemisphere. More...
 
 LSDPolyline (vector< double > x, vector< double > y, int UTMZone, bool isNorth)
 Create with two vectors. UTM info provided The X should be Easting or Longitude the Y vector should be Northing. More...
 
 LSDPolyline (vector< float > x, vector< float > y, int UTMZone, bool isNorth)
 Create with two vectors. UTM info provided The X should be Easting or Longitude the Y vector should be Northing. More...
 
void make_simple_polyline ()
 This sets the polyline node_order to simply be the order of the points. This only makes the simple polyline if the node_order vector is empty. More...
 
void force_simple_polyline ()
 This sets the polyline node_order to simply be the order of the points. This overwrites any existing node_order data. More...
 
void get_affected_pixels_in_line_segment (LSDRasterInfo &RI, vector< int > &affected_rows, vector< int > &affected_cols, int start_index, int end_index)
 this Gets the pixels of all the nodes along the path of a line More...
 
void get_affected_pixels_in_line_segment_brute_force (LSDRasterInfo &RI, vector< int > &affected_rows, vector< int > &affected_cols, int start_index, int end_index)
 this Gets the pixels of all the nodes along a segment of a line The strategy here is just to increment along a line so this has the possiblity of missing nodes if the incrementing is too coarse. More...
 
void get_affected_pixels_in_line (LSDRasterInfo &RI, vector< int > &affected_rows, vector< int > &affected_cols)
 this Gets the pixels of all the nodes along the path of a line More...
 
vector< int > get_flowinfo_nodes_of_line (LSDRasterInfo &RI, LSDFlowInfo &FlowInfo)
 Method to return a vector of node indexes of every cell intersected by the polyline. Calls get_affected_pixels_in_line(). More...
 
- Public Member Functions inherited from LSDGeometry
 LSDGeometry ()
 Empty create function. Leads to some empty vectors. More...
 
 LSDGeometry (vector< double > x, vector< double > y)
 Create with two vectors: no UTM provided so assumed lat/long The X should be Longitude the Y vector should be latitude. More...
 
 LSDGeometry (vector< float > x, vector< float > y)
 Create with two vectors: no UTM provided so assumed lat/long The X should be Longitude the Y vector should be latitude. More...
 
 LSDGeometry (vector< double > x, vector< double > y, int UTMZone)
 Create with two vectors. UTM info provided The X should be Easting or Longitude the Y vector should be Northing This version assumes northern hemisphere. More...
 
 LSDGeometry (vector< float > x, vector< float > y, int UTMZone)
 Create with two vectors. UTM info provided The X should be Easting or Longitude the Y vector should be Northing This version assumes northern hemisphere. More...
 
 LSDGeometry (vector< double > x, vector< double > y, int UTMZone, bool isNorth)
 Create with two vectors. UTM info provided The X should be Easting or Longitude the Y vector should be Northing. More...
 
 LSDGeometry (vector< float > x, vector< float > y, int UTMZone, bool isNorth)
 Create with two vectors. UTM info provided The X should be Easting or Longitude the Y vector should be Northing. More...
 
void convert_points_to_UTM ()
 This function converts points from Lat/Long to UTM. The UTM zone is set as the zone of the first data point If there is no data in the Lat/Long data vectors no action is taken. More...
 
void convert_points_to_LatLong ()
 This function converts points from UTM to Lat/Long. The UTM zone is set as the zone of the first data point If there is no data in the Lat/Long data vectors no action is taken. More...
 
void print_points_to_csv (string path, string file_prefix)
 This prints the points to a csv file. It will contain both UTM and lat-long coordinates. The UTM zone is the zone of the first point, The lat long coordinates are in WGS84. More...
 
void find_row_and_col_of_points (LSDRasterInfo &RI, vector< int > &RowOfNodes, vector< int > &ColOfNodes)
 This gets vectors continaing the row and columns of the points from an LSDRasterInfo object. More...
 
void find_row_and_col_of_point_inc_out_of_bounds (LSDRasterInfo &RI, int point_index, int &RowOfNode, int &ColOfNode, bool &IsOutOfBounds)
 This gets the row and column of a point based on an LSDRasterInfo It will return negative and out of bounds indices: used to work with functions for determining affected pixels. More...
 
void find_row_and_col_of_point_inc_out_of_bounds (LSDRasterInfo &RI, double UTM_Easting, double UTM_northing, int &RowOfNode, int &ColOfNode, bool &IsOutOfBounds)
 This gets the row and column of a point based on an LSDRasterInfo It will return negative and out of bounds indices: used to work with finctions for determining affected pixels. More...
 
void check_and_update_UTM ()
 This function checks to see if the data has been converted to UTM and if not updates it. More...
 
double get_max_UTM_Northing ()
 This gets the maximum northing value. More...
 
double get_min_UTM_Northing ()
 This gets the minimum northing value. More...
 
double get_max_UTM_Easting ()
 This gets the maximum Easting value. More...
 
double get_min_UTM_Easting ()
 This gets the minimum Easting value. More...
 
int get_UTMZone ()
 
bool get_isNorth ()
 
vector< double > get_UTMPoints_Easting ()
 
vector< double > get_UTMPoints_Northing ()
 
vector< double > get_WGS84Points_latitude ()
 
vector< double > get_WGS84Points_longitude ()
 

Protected Attributes

vector< int > node_order
 A vector containing the order in which poins are connected.
 
- Protected Attributes inherited from LSDGeometry
int UTMZone
 
bool isNorth
 
vector< double > UTMPoints_Easting
 
vector< double > UTMPoints_Northing
 
vector< double > WGS84Points_latitude
 
vector< double > WGS84Points_longitude
 

Additional Inherited Members

- Protected Member Functions inherited from LSDGeometry
void create (vector< double > x, vector< double > y)
 
void create (vector< float > x, vector< float > y)
 
void create (vector< double > x, vector< double > y, int UTMZone)
 
void create (vector< float > x, vector< float > y, int UTMZone)
 
void create (vector< double > x, vector< double > y, int UTMZone, bool isNorth)
 
void create (vector< float > x, vector< float > y, int UTMZone, bool isNorth)
 

Detailed Description

This object packages a number of tools for chi analysis.

Constructor & Destructor Documentation

LSDPolyline::LSDPolyline ( vector< double >  x,
vector< double >  y 
)
inline

Create with two vectors: no UTM provided so assumed lat/long The X should be Longitude the Y vector should be latitude.

Parameters
xThe longitdue data in a vector
ythe latitude data in a vector
Author
SMM
Date
10/06/2016
LSDPolyline::LSDPolyline ( vector< float >  x,
vector< float >  y 
)
inline

Create with two vectors: no UTM provided so assumed lat/long The X should be Longitude the Y vector should be latitude.

Parameters
xThe longitdue data in a vector
ythe latitude data in a vector
Author
SMM
Date
10/06/2016
LSDPolyline::LSDPolyline ( vector< double >  x,
vector< double >  y,
int  UTMZone 
)
inline

Create with two vectors. UTM info provided The X should be Easting or Longitude the Y vector should be Northing This version assumes northern hemisphere.

Parameters
xThe Easting data in a vector
ythe Northing data in a vector
Author
SMM
Date
13/06/2016
LSDPolyline::LSDPolyline ( vector< float >  x,
vector< float >  y,
int  UTMZone 
)
inline

Create with two vectors. UTM info provided The X should be Easting or Longitude the Y vector should be Northing This version assumes northern hemisphere.

Parameters
xThe Easting data in a vector
ythe Northing data in a vector
Author
SMM
Date
13/06/2016
LSDPolyline::LSDPolyline ( vector< double >  x,
vector< double >  y,
int  UTMZone,
bool  isNorth 
)
inline

Create with two vectors. UTM info provided The X should be Easting or Longitude the Y vector should be Northing.

Parameters
xThe Easting data in a vector
ythe Northing data in a vector
Author
SMM
Date
13/06/2016
LSDPolyline::LSDPolyline ( vector< float >  x,
vector< float >  y,
int  UTMZone,
bool  isNorth 
)
inline

Create with two vectors. UTM info provided The X should be Easting or Longitude the Y vector should be Northing.

Parameters
xThe Easting data in a vector
ythe Northing data in a vector
Author
SMM
Date
13/06/2016

Member Function Documentation

void LSDPolyline::force_simple_polyline ( )

This sets the polyline node_order to simply be the order of the points. This overwrites any existing node_order data.

Author
SMM
Date
14/06/2016
void LSDPolyline::get_affected_pixels_in_line ( LSDRasterInfo RI,
vector< int > &  affected_rows,
vector< int > &  affected_cols 
)

this Gets the pixels of all the nodes along the path of a line

Parameters
RIan LSDRasterInfo object
affected_rowsA vector containing the row numbers of the affected pixels
affected_colsA vector containing the col numbers of the affected pixels
Author
SMM
Date
16/06/2016
void LSDPolyline::get_affected_pixels_in_line_segment ( LSDRasterInfo RI,
vector< int > &  affected_rows,
vector< int > &  affected_cols,
int  start_index,
int  end_index 
)

this Gets the pixels of all the nodes along the path of a line

Parameters
RIan LSDRasterInfo object
affected_rowsA vector containing the row numbers of the affected pixels
affected_colsA vector containing the col numbers of the affected pixels
start_indexThe index into the UTM coordinate vector of the starting node
end_indexthe index into the UTM coodinate index of the ending node
Author
SMM
Date
14/06/2016
void LSDPolyline::get_affected_pixels_in_line_segment_brute_force ( LSDRasterInfo RI,
vector< int > &  affected_rows,
vector< int > &  affected_cols,
int  start_index,
int  end_index 
)

this Gets the pixels of all the nodes along a segment of a line The strategy here is just to increment along a line so this has the possiblity of missing nodes if the incrementing is too coarse.

Parameters
RIan LSDRasterInfo object
affected_rowsA vector containing the row numbers of the affected pixels
affected_colsA vector containing the col numbers of the affected pixels
start_indexThe index into the UTM coordinate vector of the starting node
end_indexthe index into the UTM coodinate index of the ending node
Author
SMM
Date
15/06/2016
vector< int > LSDPolyline::get_flowinfo_nodes_of_line ( LSDRasterInfo RI,
LSDFlowInfo FlowInfo 
)

Method to return a vector of node indexes of every cell intersected by the polyline. Calls get_affected_pixels_in_line().

Parameters
RIan LSDRasterInfo object.
FlowInfoan LSDFlowInfo object.
Returns
Vector of integer node indexes.
Author
SWDG
Date
22/7/16
void LSDPolyline::make_simple_polyline ( )

This sets the polyline node_order to simply be the order of the points. This only makes the simple polyline if the node_order vector is empty.

Author
SMM
Date
14/06/2016

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