Viewshed 6.1.0
A C++ library for calculation of viewshed, inverse viewshed and visibility indices for both of those analyses.
Loading...
Searching...
No Matches
Point Class Reference

Class that represents important point for viewshed - view point, or inverse viewshed - target point. The point is specified by cell position in raster coordinates, world coordinates, elevation at point, offset from elevation and cell size. More...

#include <point.h>

Inheritance diagram for Point:
Collaboration diagram for Point:

Public Member Functions

 Point ()
 Construct a new Point object which is empty.
 Point (int row_, int col_, double elevation, double offset, double cellSize)
 Construct a new Point object by manually specifying all the necessary information.
 Point (OGRPoint point, std::shared_ptr< SingleBandRaster > dem, double offsetAtPoint=OBSERVER_OFFSET)
 Construct a new Point object from OGRPoint, SingleBandRaster and offset.
double totalElevation ()
 Combination of elevation plus offset;.
double distance (std::shared_ptr< Point > point)
 Distance from another point.
bool isValid ()
 Check if the point is valid.

Public Attributes

double mX = 0
double mY = 0
double mElevation = 0
double mOffset = 0
double mCellSize = 0
Public Attributes inherited from viewshed::RasterPosition
int mRow = -1
int mCol = -1

Protected Member Functions

void setUp (OGRPoint point, std::shared_ptr< SingleBandRaster > dem)
void setUp (int row, int col, std::shared_ptr< SingleBandRaster > dem)

Protected Attributes

bool mValid = false

Detailed Description

Class that represents important point for viewshed - view point, or inverse viewshed - target point. The point is specified by cell position in raster coordinates, world coordinates, elevation at point, offset from elevation and cell size.

Constructor & Destructor Documentation

◆ Point() [1/2]

Point::Point ( int row_,
int col_,
double elevation,
double offset,
double cellSize )

Construct a new Point object by manually specifying all the necessary information.

Parameters
row
col
elevation
offset
cellSize

◆ Point() [2/2]

Point::Point ( OGRPoint point,
std::shared_ptr< SingleBandRaster > dem,
double offsetAtPoint = OBSERVER_OFFSET )

Construct a new Point object from OGRPoint, SingleBandRaster and offset.

Parameters
point
dem
offsetAtPoint
rasterBand

Member Function Documentation

◆ distance()

double Point::distance ( std::shared_ptr< Point > point)

Distance from another point.

Parameters
point
Returns
double

◆ isValid()

bool Point::isValid ( )

Check if the point is valid.

Returns
true
false

◆ totalElevation()

Combination of elevation plus offset;.

Returns
double

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