2#include "viewshed_export.h"
10#include "visibility.h"
24 class DLL_API AbstractLoS :
public std::vector<LoSNode>
27 virtual ~AbstractLoS() =
default;
41 void setViewPoint( std::shared_ptr<LoSNode> poi,
double observerOffset = 0 );
54 void setTargetPoint( std::shared_ptr<LoSNode> poi,
double targetOffset = 0 );
93 virtual bool isValid() = 0;
178 std::shared_ptr<Point>
vp();
227 double viewPointElevation();
234 double viewPointTotalElevation();
241 virtual void setCurrentLoSNode( std::size_t i );
249 double currentDistance();
257 double currentGradient();
265 double currentElevation();
292 std::shared_ptr<Point>
mVp = std::make_shared<Point>();
298 std::shared_ptr<Point>
mTp = std::make_shared<Point>();
void setTargetPoint(std::shared_ptr< Point > tp)
Set the Target Point object directly from Point with offset specified as part of this object.
Definition abstractlos.cpp:29
void setAngle(double angle)
Set the horizontal angle for extracting elevations, distances and gradients from line-of-sight.
Definition abstractlos.cpp:44
void setViewPoint(std::shared_ptr< Point > vp)
Set the View Point object directly from Point with offset specified as part of this object.
Definition abstractlos.cpp:13
std::shared_ptr< Point > vp()
View point for this line-of-sight.
Definition abstractlos.cpp:50
Abstract class that represent line-of-sight (LoS). Consists of LoSNodes, view point and target point ...
Definition abstractlos.h:25
double targetDistance()
Distance of target.
Definition abstractlos.cpp:20
void setRefractionCoeficient(double refractionCoeff)
Set the Refraction Coeficient for curvature corrections.
Definition abstractlos.h:206
double curvatureCorrectionsFix(const double distance)
Elevation changes using currently set curvature corrections for specific distance.
Definition abstractlos.cpp:68
virtual int targetPointIndex()=0
Index of target point in the line-of-sight.
int targetIndex()
Get index of target point in the current LoS.
Definition abstractlos.h:220
virtual int resultRow()=0
Row number where the outcome of LoS analysis should be stored.
double mEarthDiameter
Earth diameter for curvature corrections.
Definition abstractlos.h:316
double targetElevation()
Elevation of target.
Definition abstractlos.cpp:27
int targetRow()
Row number for the target of LoS.
Definition abstractlos.cpp:48
double mRefractionCoefficient
Refraction coefficient for curvature corrections.
Definition abstractlos.h:322
double mPointDistance
Distance between observer and target point.
Definition abstractlos.h:286
virtual LoSNode nodeAt(std::size_t i)=0
LoSNode at specific index.
void applyCurvatureCorrections(bool apply)
Set curvature corrections on/off.
Definition abstractlos.h:199
double horizontalAngle()
Horizontal angle for this line-of-sight.
Definition abstractlos.cpp:42
virtual void findTargetPointIndex()=0
Retrieve index of target point in this LoS.
virtual void sort()=0
Sort LoSNodes by distance from View point.
LoSNode mCurrentLoSNode
Currently solved LoS Node.
Definition abstractlos.h:334
int targetCol()
Column number for the target of LoS.
Definition abstractlos.cpp:46
virtual int resultCol()=0
Column number where the outcome of LoS analysis should be stored.
void setEarthDiameter(double earthDiameter)
Set the Earth Diameter for curvature corrections.
Definition abstractlos.h:213
std::shared_ptr< Point > mTp
Target point.
Definition abstractlos.h:298
double targetGradient()
Gradient of target.
Definition abstractlos.cpp:22
bool mCurvatureCorrections
Use curvature corrections for this LoS.
Definition abstractlos.h:310
double mAngleHorizontal
Horizontal angle between view point and target point.
Definition abstractlos.h:280
virtual int numberOfNodes()=0
Number of LoSNodes in this line-of-sight.
std::shared_ptr< Point > mVp
View point.
Definition abstractlos.h:292
virtual void prepareForCalculation()=0
Prepare line-of-sight for calculation. For example inverse LoS needs some preprocessing before being ...
double elevation(std::size_t i)
Extract elevation for line-of-sight LoSNode at position i.
Definition abstractlos.cpp:78
void applyCurvatureCorrections(bool apply, double refractionCoeff, double earthDiameter)
Specify curvature corrections settings.
Definition abstractlos.h:187
int mTargetIndex
Index of target point.
Definition abstractlos.h:304
std::shared_ptr< Point > vp()
View point for this line-of-sight.
Definition abstractlos.cpp:50
double gradient(std::size_t i)
Extract gradient value for line-of-sight LoSNode at position i.
Definition abstractlos.cpp:100
double distance(std::size_t i)
Extract distance for line-of-sight LoSNode at position i.
Definition abstractlos.cpp:95
Class representing cell events for Van Kreveld's plane sweep algorithm. Stores cell position (row and...
Definition cellevent.h:17
Representation of single cell that creates a point on LoS.
Definition losnode.h:19