Class that contains mostly static helper functions.
More...
#include <viewshedutils.h>
|
| static void | saveToCsv (std::vector< DataTriplet > data, std::string header, std::string fileName) |
| | Save data vector of DataTriplets as CSV file.
|
| static void | saveToCsv (std::vector< std::string > rows, std::string header, std::string fileName) |
| | Save arbitrary rows as CSV file.
|
| static std::vector< DataTriplet > | distanceElevation (std::shared_ptr< AbstractLoS > los) |
| | Extracts triplets of distance, elevation and target point (boolean) from provided LoS.
|
|
static std::vector< std::pair< double, double > > | rasterCoordinates (std::shared_ptr< std::vector< LoSNode > > los, LoSNode poi) |
| static double | earthDiameter (OGRSpatialReference crs) |
| | Extract Earth's diameter from ellipsoid associated with provided coordinate reference system.
|
| static bool | validateRaster (std::shared_ptr< SingleBandRaster > r1, std::string &error) |
| | Validate the raster for viewshed calculation, checks if it fulfills all the requirements.
|
| 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 mask for the second raster, which should be raster of digital surface model.
|
| static std::shared_ptr< ViewshedAlgorithms > | allAlgorithms () |
| | Returns list of all implemented viewshed indices as algorithms to be used in viewshed of inverse viewshed calculation.
|
| static std::shared_ptr< ViewshedAlgorithms > | allAlgorithms (double invisibleValue) |
| | Returns list of all implemented viewshed indices as algorithms to be used in viewshed of inverse viewshed calculation. Allows setting specific value to be used in some algorithms as invisible value.
|
|
static bool | doubleEqual (double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon()) |
Class that contains mostly static helper functions.
◆ allAlgorithms() [1/2]
Returns list of all implemented viewshed indices as algorithms to be used in viewshed of inverse viewshed calculation.
- Returns
- std::shared_ptr<std::vector<std::shared_ptr<AbstractViewshedAlgorithm>>>
◆ allAlgorithms() [2/2]
Returns list of all implemented viewshed indices as algorithms to be used in viewshed of inverse viewshed calculation. Allows setting specific value to be used in some algorithms as invisible value.
- Parameters
-
- Returns
- std::shared_ptr<std::vector<std::shared_ptr<AbstractViewshedAlgorithm>>>
◆ compareRasters()
Checks if the two rasters have the same properties and that one can be used visibility calculation mask for the second raster, which should be raster of digital surface model.
- Parameters
-
| r1 | |
| r2 | |
| error | Returned error message. |
- Returns
- true
-
false
◆ distanceElevation()
Extracts triplets of distance, elevation and target point (boolean) from provided LoS.
- Parameters
-
- Returns
- std::vector<DataTriplet>
◆ earthDiameter()
Extract Earth's diameter from ellipsoid associated with provided coordinate reference system.
- Parameters
-
- Returns
- double
◆ saveToCsv() [1/2]
Save data vector of DataTriplets as CSV file.
- Parameters
-
| data | |
| header | formatted header of CSV. |
| fileName | filename with path to store data into. |
◆ saveToCsv() [2/2]
Save arbitrary rows as CSV file.
- Parameters
-
| rows | formatted rows of the CSV, "\n" is added automatically at the end of string. |
| header | formatted header of CSV. |
| fileName | filename with path to store data into. |
◆ validateRaster()
Validate the raster for viewshed calculation, checks if it fulfills all the requirements.
- Parameters
-
| r1 | |
| error | Returned error message. |
- Returns
- true
-
false
The documentation for this class was generated from the following files:
- /home/runner/work/cpp-viewshed-library/cpp-viewshed-library/include/viewshed/viewshedutils.h
- /home/runner/work/cpp-viewshed-library/cpp-viewshed-library/src/library/utils/viewshedutils.cpp