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.h
1#pragma once
2#include "viewshed_export.h"
3
4#include <memory>
5
6#include "constants.h"
7#include "rasterposition.h"
8
9class SingleBandRaster;
10class OGRPoint;
11
12namespace viewshed
13{
20 class DLL_API Point : public RasterPosition
21 {
22 public:
27 Point();
37 Point( int row_, int col_, double elevation, double offset, double cellSize );
46 Point( OGRPoint point, std::shared_ptr<SingleBandRaster> dem, double offsetAtPoint = OBSERVER_OFFSET );
47
48 double mX = 0;
49 double mY = 0;
50 double mElevation = 0;
51 double mOffset = 0;
52 double mCellSize = 0;
53
59 double totalElevation();
66 double distance( std::shared_ptr<Point> point );
73 bool isValid();
74
75 protected:
76 bool mValid = false;
77
78 void setUp( OGRPoint point, std::shared_ptr<SingleBandRaster> dem );
79 void setUp( int row, int col, std::shared_ptr<SingleBandRaster> dem );
80 };
81
82} // namespace viewshed
double distance(std::shared_ptr< Point > point)
Distance from another point.
Definition point.cpp:66
double totalElevation()
Combination of elevation plus offset;.
Definition point.cpp:62
bool isValid()
Check if the point is valid.
Definition point.cpp:64
Point()
Construct a new Point object which is empty.
Definition point.cpp:9