2#include "viewshed_export.h"
8#include "viewshedtypes.h"
10class OGRSpatialReference;
11class SingleBandRaster;
13using viewshed::ViewshedAlgorithms;
26 struct DLL_API DataTriplet
28 DataTriplet(
double f,
double s,
bool t )
54 static void saveToCsv( std::vector<DataTriplet> data, std::string header, std::string fileName );
63 static void saveToCsv( std::vector<std::string> rows, std::string header, std::string fileName );
71 static std::vector<DataTriplet>
distanceElevation( std::shared_ptr<AbstractLoS> los );
73 static std::vector<std::pair<double, double>> rasterCoordinates( std::shared_ptr<std::vector<LoSNode>> los,
92 static bool validateRaster( std::shared_ptr<SingleBandRaster> r1, std::string &error );
104 static bool compareRasters( std::shared_ptr<SingleBandRaster> r1, std::shared_ptr<SingleBandRaster> r2,
105 std::string &error );
122 static std::shared_ptr<ViewshedAlgorithms>
allAlgorithms(
double invisibleValue );
124 static bool doubleEqual(
double a,
double b,
double epsilon = 4 * std::numeric_limits<double>::epsilon() );
Abstract class that represent line-of-sight (LoS). Consists of LoSNodes, view point and target point ...
Definition abstractlos.h:25
Base class for all Viewshed Algorithms.
Definition abstractviewshedalgorithm.h:19
Representation of single cell that creates a point on LoS.
Definition losnode.h:19
Class that contains mostly static helper functions.
Definition viewshedutils.h:45
static void saveToCsv(std::vector< DataTriplet > data, std::string header, std::string fileName)
Save data vector of DataTriplets as CSV file.
Definition viewshedutils.cpp:42
static double earthDiameter(OGRSpatialReference crs)
Extract Earth's diameter from ellipsoid associated with provided coordinate reference system.
Definition viewshedutils.cpp:107
static bool compareRasters(std::shared_ptr< SingleBandRaster > r1, std::shared_ptr< SingleBandRaster > r2, std::string &error)
Checks if the two rasters have the same properties and that one can be used visibility calculation ma...
Definition viewshedutils.cpp:122
static std::shared_ptr< ViewshedAlgorithms > allAlgorithms()
Returns list of all implemented viewshed indices as algorithms to be used in viewshed of inverse view...
Definition viewshedutils.cpp:195
static bool validateRaster(std::shared_ptr< SingleBandRaster > r1, std::string &error)
Validate the raster for viewshed calculation, checks if it fulfills all the requirements.
Definition viewshedutils.cpp:160
static std::vector< DataTriplet > distanceElevation(std::shared_ptr< AbstractLoS > los)
Extracts triplets of distance, elevation and target point (boolean) from provided LoS.
Definition viewshedutils.cpp:72