-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathbag_surfacecorrectionsdescriptor.h
More file actions
109 lines (88 loc) · 3.64 KB
/
bag_surfacecorrectionsdescriptor.h
File metadata and controls
109 lines (88 loc) · 3.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#ifndef BAG_SURFACECORRECTIONSDESCRIPTOR_H
#define BAG_SURFACECORRECTIONSDESCRIPTOR_H
#include "bag_config.h"
#include "bag_fordec.h"
#include "bag_layerdescriptor.h"
#include "bag_types.h"
#include <memory>
namespace BAG {
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4251) // std classes do not have DLL-interface when exporting
#endif
//! Describe a surface corrections layer.
class BAG_API SurfaceCorrectionsDescriptor final : public LayerDescriptor
{
public:
static std::shared_ptr<SurfaceCorrectionsDescriptor> create(
const Dataset& dataset, BAG_SURFACE_CORRECTION_TOPOGRAPHY type,
uint8_t numCorrections, uint64_t chunkSize, int compressionLevel);
static std::shared_ptr<SurfaceCorrectionsDescriptor> open(
const Dataset& dataset);
SurfaceCorrectionsDescriptor(const SurfaceCorrectionsDescriptor&) = delete;
SurfaceCorrectionsDescriptor(SurfaceCorrectionsDescriptor&&) = delete;
SurfaceCorrectionsDescriptor& operator=(const SurfaceCorrectionsDescriptor&) = delete;
SurfaceCorrectionsDescriptor& operator=(SurfaceCorrectionsDescriptor&&) = delete;
bool operator==(const SurfaceCorrectionsDescriptor &rhs) const noexcept {
return m_surfaceType == rhs.m_surfaceType &&
m_elementSize == rhs.m_elementSize &&
m_numCorrectors == rhs.m_numCorrectors &&
m_verticalDatums == rhs.m_verticalDatums &&
m_swX == rhs.m_swX &&
m_swY == rhs.m_swY &&
m_xSpacing == rhs.m_xSpacing &&
m_ySpacing == rhs.m_ySpacing &&
m_numRows == rhs.m_numRows &&
m_numColumns == rhs.m_numColumns;
}
bool operator!=(const SurfaceCorrectionsDescriptor &rhs) const noexcept {
return !(rhs == *this);
}
std::tuple<uint32_t, uint32_t> getDims() const noexcept;
uint8_t getNumCorrectors() const noexcept;
std::tuple<double, double> getOrigin() const noexcept;
std::tuple<double, double> getSpacing() const noexcept;
BAG_SURFACE_CORRECTION_TOPOGRAPHY getSurfaceType() const noexcept;
const std::string& getVerticalDatums() const & noexcept;
SurfaceCorrectionsDescriptor& setDims(uint32_t numRows,
uint32_t numColumns) & noexcept;
SurfaceCorrectionsDescriptor& setOrigin(double swX,
double swY) & noexcept;
SurfaceCorrectionsDescriptor& setSpacing(double xSpacing,
double ySpacing) & noexcept;
SurfaceCorrectionsDescriptor& setVerticalDatums(
std::string verticalDatums) & noexcept;
protected:
SurfaceCorrectionsDescriptor(uint32_t id,
BAG_SURFACE_CORRECTION_TOPOGRAPHY type, uint8_t numCorrectors,
uint64_t chunkSize, int compressionLevel);
explicit SurfaceCorrectionsDescriptor(const Dataset& dataset);
private:
DataType getDataTypeProxy() const noexcept override;
uint8_t getElementSizeProxy() const noexcept override;
//! The type of surface this correction applies to.
BAG_SURFACE_CORRECTION_TOPOGRAPHY m_surfaceType = BAG_SURFACE_UNKNOWN;
//! The size of a node.
uint8_t m_elementSize = 0;
//! Number of correction values.
uint8_t m_numCorrectors = 0;
//! The name of the vertical datum(s).
std::string m_verticalDatums;
//! South-West corner X's value.
double m_swX = 0.;
//! South-West corner Y's value.
double m_swY = 0.;
//! Node spacing X.
double m_xSpacing = 0.;
//! Node spacing Y.
double m_ySpacing = 0.;
//! Number of rows.
uint32_t m_numRows = 0;
//! Number of columns.
uint32_t m_numColumns = 0;
};
#ifdef _MSC_VER
#pragma warning(pop)
#endif
} // namespace BAG
#endif // BAG_SURFACECORRECTIONSDESCRIPTOR_H