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

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

#include <LSDGeometry.hpp>

Inheritance diagram for LSDGeometry:
LSDPolyline

Public Member Functions

 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 Member Functions

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)
 

Protected Attributes

int UTMZone
 
bool isNorth
 
vector< double > UTMPoints_Easting
 
vector< double > UTMPoints_Northing
 
vector< double > WGS84Points_latitude
 
vector< double > WGS84Points_longitude
 

Detailed Description

This object packages a number of tools for chi analysis.

Constructor & Destructor Documentation

LSDGeometry::LSDGeometry ( )
inline

Empty create function. Leads to some empty vectors.

Author
SMM
Date
10/06/2016
LSDGeometry::LSDGeometry ( 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
LSDGeometry::LSDGeometry ( 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
LSDGeometry::LSDGeometry ( 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
LSDGeometry::LSDGeometry ( 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
LSDGeometry::LSDGeometry ( 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
LSDGeometry::LSDGeometry ( 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 LSDGeometry::check_and_update_UTM ( )

This function checks to see if the data has been converted to UTM and if not updates it.

Author
SMM
Date
14/06/2016
void LSDGeometry::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.

Author
SMM
Date
13/06/2016
void LSDGeometry::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.

Author
SMM
Date
10/06/2016
void LSDGeometry::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.

Parameters
RIand LSDRasterInfo object
point_indexan index into the UTM data vectors
RowOfNodethe row of the point (this is replaced by the function)
ColOfNodethe col of the point (this is replaced by the function)
IsOutOfBoundsa boolean that is true if the point is out of the bounds of the raster
Author
SMM
Date
15/06/2106
void LSDGeometry::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.

Parameters
RIand LSDRasterInfo object
UTM_Eastingan easting location
UTM_Northinga northing location
RowOfNodethe row of the point (this is replaced by the function)
ColOfNodethe col of the point (this is replaced by the function)
IsOutOfBoundsa boolean that is true if the point is out of the bounds of the raster
Author
SMM
Date
15/06/2106
void LSDGeometry::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.

Parameters
RIand LSDRasterInfo object
row_veca vector containing the rows of the points (this is replaced by the function)
col_veca vector containing the cols of the points (this is replaced by the function)
Author
SMM
Date
14/06/2106
double LSDGeometry::get_max_UTM_Easting ( )

This gets the maximum Easting value.

Returns
maximum UTM Easting
Author
SMM
Date
14/06/2016
double LSDGeometry::get_max_UTM_Northing ( )

This gets the maximum northing value.

Returns
maximum UTM northing
Author
SMM
Date
14/06/2016
double LSDGeometry::get_min_UTM_Easting ( )

This gets the minimum Easting value.

Returns
minimum UTM Easting
Author
SMM
Date
14/06/2016
double LSDGeometry::get_min_UTM_Northing ( )

This gets the minimum northing value.

Returns
minimum UTM northing
Author
SMM
Date
14/06/2016
void LSDGeometry::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.

Parameters
pathThe path to the outfile. Needs the trailing slash
file_prefixThe prefix of the file before extension. That is, this function will add the .csv to the end of the filename
Author
SMM
Date
13/06/2016

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