22#include "viewshed_types.h"
37 int nY,
const Window &oOutExtent,
const Window &oCurExtent,
51 double m_dfHeightAdjFactor{0};
52 double m_dfMaxDistance2;
53 double m_dfZObserver{0};
56 std::array<double, 6> m_adfTransform{0, 1, 0, 0, 0, 1};
57 double (*oZcalc)(int, int, double, double, double){};
59 double calcHeightAdjFactor();
60 void setOutput(
double &dfResult,
double &dfCellVal,
double dfZ);
61 bool readLine(
int nLine,
double *data);
62 bool writeLine(
int nLine, std::vector<double> &vResult);
63 bool processLine(
int nLine, std::vector<double> &vLastLineVal);
64 bool processFirstLine(std::vector<double> &vLastLineVal);
65 void processFirstLineLeft(
int iStart,
int iEnd,
66 std::vector<double> &vResult,
67 std::vector<double> &vThisLineVal);
68 void processFirstLineRight(
int iStart,
int iEnd,
69 std::vector<double> &vResult,
70 std::vector<double> &vThisLineVal);
71 void processFirstLineTopOrBottom(
int iLeft,
int iRight,
72 std::vector<double> &vResult,
73 std::vector<double> &vThisLineVal);
74 void processLineLeft(
int nYOffset,
int iStart,
int iEnd,
75 std::vector<double> &vResult,
76 std::vector<double> &vThisLineVal,
77 std::vector<double> &vLastLineVal);
78 void processLineRight(
int nYOffset,
int iStart,
int iEnd,
79 std::vector<double> &vResult,
80 std::vector<double> &vThisLineVal,
81 std::vector<double> &vLastLineVal);
82 std::pair<int, int> adjustHeight(
int iLine,
83 std::vector<double> &thisLineVal);
Pool of worker threads.
Definition: cpl_worker_thread_pool.h:66
A single raster band (or channel).
Definition: gdal_priv.h:1519
Support for progress reporting in viewshed construction.
Definition: progress.h:23
Executes a viewshed computation on a source band, placing the result in the destination band.
Definition: viewshed_executor.h:34
ViewshedExecutor(GDALRasterBand &srcBand, GDALRasterBand &dstBand, int nX, int nY, const Window &oOutExtent, const Window &oCurExtent, const Options &opts, Progress &oProgress)
Constructor – the viewshed algorithm executor.
Definition: viewshed_executor.cpp:105
bool run()
Run the viewshed computation.
Definition: viewshed_executor.cpp:626
Class to manage a pool of worker threads.
Options for viewshed generation.
Definition: viewshed_types.h:58
A window in a raster including pixels in [xStart, xStop) and [yStart, yStop).
Definition: viewshed_types.h:83