GDAL

combiner.h
1/******************************************************************************
2 * (c) 2024 info@hobu.co
3 *
4 * SPDX-License-Identifier: MIT
5 ****************************************************************************/
6
7#ifndef VIEWSHED_COMBINER_H_INCLUDED
8#define VIEWSHED_COMBINER_H_INCLUDED
9
10#include "cumulative.h"
11#include "viewshed_types.h"
12
13 namespace gdal
14{
15 namespace viewshed
16{
17
21 class Combiner
22{
23 public:
27 Combiner(Cumulative::DatasetQueue &inputQueue,
28 Cumulative::DatasetQueue &outputQueue)
29 : m_inputQueue(inputQueue), m_outputQueue(outputQueue)
30 {
31 }
32
35 // cppcheck-suppress missingMemberCopy
36 Combiner(const Combiner &src)
37 : m_inputQueue(src.m_inputQueue), m_outputQueue(src.m_outputQueue)
38 {
39 }
40
41 void queueOutputBuffer();
42 void run();
43
44 private:
45 Cumulative::DatasetQueue &m_inputQueue;
46 Cumulative::DatasetQueue &m_outputQueue;
47 DatasetPtr m_dataset{};
48 size_t m_count{0};
49
50 void sum(DatasetPtr srcDs);
51};
52
53} // namespace viewshed
54} // namespace gdal
55
56#endif
gdal::viewshed::Combiner
Reads completed viewshed rasters and sums them together.
Definition combiner.h:22
gdal::viewshed::Combiner::run
void run()
Read viewshed executor output and sum it up in our owned memory raster.
Definition combiner.cpp:16
gdal::viewshed::Combiner::Combiner
Combiner(const Combiner &src)
Copy ctor.
Definition combiner.h:36
gdal::viewshed::Combiner::Combiner
Combiner(Cumulative::DatasetQueue &inputQueue, Cumulative::DatasetQueue &outputQueue)
Constructor.
Definition combiner.h:27
gdal::viewshed::Combiner::queueOutputBuffer
void queueOutputBuffer()
Queue the owned buffer as for output.
Definition combiner.cpp:54
gdal::viewshed::NotifyQueue< DatasetPtr >