Bridges-C++  3.4.4
Bridges(C++ API)
Public Member Functions | List of all members
bridges::dataset::ElevationData Class Reference

#include <ElevationData.h>

Detailed Description

Class that hold elevation data.

Class that holds Elevation data.

A user would not normally create an ElevationData object but rather obtain one from calling bridges::DataSource::getElevationData()

A tutorial on how to use the Elevation dataset is available at: https://bridgesuncc.github.io/tutorials/Data_Elevation.html

Author
Kalpathi Subramanian
Date
3/28/20

Public Member Functions

 ElevationData ()
 
 ElevationData (int r, int c)
 
 ElevationData (int cols, int rows, int xll, int yll, float cellsize, int maxVal, int minVal)
 
 ~ElevationData ()
 
int getCols () const
 
void setCols (int c)
 
vector< int > getData ()
 
int getVal (int r, int c) const
 
void setVal (int r, int c, int val)
 
int getRows () const
 
void setRows (int r)
 
int getxll () const
 
void setxll (int x_ll)
 
int getyll () const
 
void setyll (int y_ll)
 
float getCellSize () const
 
void setCellSize (float cell_size)
 
int getMaxVal () const
 
void setMaxVal (int max_val)
 
int getMinVal () const
 
void setMinVal (int min_val)
 

Constructor & Destructor Documentation

◆ ElevationData() [1/3]

bridges::dataset::ElevationData::ElevationData ( )
inline

default constructor

assumes all values will be set

◆ ElevationData() [2/3]

bridges::dataset::ElevationData::ElevationData ( int  r,
int  c 
)
inline

constructor

assumes all values will be explicit set

Parameters
rnumber of rows (height) of elevation map
cnumber of columns (width) of elevation map

◆ ElevationData() [3/3]

bridges::dataset::ElevationData::ElevationData ( int  cols,
int  rows,
int  xll,
int  yll,
float  cellsize,
int  maxVal,
int  minVal 
)
inline

constructor

Parameters
rowsnumber of rows (height) of elevation map
colsnumber of columns (width) of elevation map
xlllower left of map - x coordinate
ylllower left of map - y coordinate
cellsizesize of each cell
maxValmax elevation value in map
maxValmin elevation value in map

◆ ~ElevationData()

bridges::dataset::ElevationData::~ElevationData ( )
inline

destructor

Member Function Documentation

◆ getCellSize()

float bridges::dataset::ElevationData::getCellSize ( ) const
inline

get data resolution

Returns
the cell size

◆ getCols()

int bridges::dataset::ElevationData::getCols ( ) const
inline

get width of elevation map

Returns
width of map

◆ getData()

vector<int> bridges::dataset::ElevationData::getData ( )
inline

get the elevation data

◆ getMaxVal()

int bridges::dataset::ElevationData::getMaxVal ( ) const
inline

get max elevation of data

Returns
the max elevation value in the map

◆ getMinVal()

int bridges::dataset::ElevationData::getMinVal ( ) const
inline

get min elevation of data

Returns
the min elevation value in the map

◆ getRows()

int bridges::dataset::ElevationData::getRows ( ) const
inline

get num rows of data

Returns
width of elevation map

◆ getVal()

int bridges::dataset::ElevationData::getVal ( int  r,
int  c 
) const
inline

get width of elevation map

Parameters
rrow index
ccolumn index

◆ getxll()

int bridges::dataset::ElevationData::getxll ( ) const
inline

get lower left corner of data (X)

Returns
x coord of lower left of map

◆ getyll()

int bridges::dataset::ElevationData::getyll ( ) const
inline

get lower left corner of data (Y)

Returns
y coord of lower left of map

◆ setCellSize()

void bridges::dataset::ElevationData::setCellSize ( float  cell_size)
inline

set data resolution

Parameters
cell_sizeset the resolution of the map to cell_size

◆ setCols()

void bridges::dataset::ElevationData::setCols ( int  c)
inline

set width of elevation map

Parameters
cwidth of map

◆ setMaxVal()

void bridges::dataset::ElevationData::setMaxVal ( int  max_val)
inline

set max elevation of data

Parameters
max_valthe max value of elevation to set

◆ setMinVal()

void bridges::dataset::ElevationData::setMinVal ( int  min_val)
inline

set min elevation of data

Parameters
min_valthe max value of elevation to set

◆ setRows()

void bridges::dataset::ElevationData::setRows ( int  r)
inline

set num rows of data

Parameters
rwidth of elevation map to set

◆ setVal()

void bridges::dataset::ElevationData::setVal ( int  r,
int  c,
int  val 
)
inline

set elevation value at row r and column c

Parameters
rrow index
ccolumn index
valelevation value

◆ setxll()

void bridges::dataset::ElevationData::setxll ( int  x_ll)
inline

set lower left corner of data (X)

Parameters
x_lllower left coord of X to set

◆ setyll()

void bridges::dataset::ElevationData::setyll ( int  y_ll)
inline

set lower left corner of data (Y)

Parameters
y_lllower left coord of Y to set

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