Technische Universität Wien
Orientation and Processing of Airborne Laser Scanning data
Department of Geodesy and Geoinformation - Research Groups Photogrammetry and Remote Sensing
distro
c++_api
inc
opals
DataSetStats.hpp
1
#pragma once
2
3
#include "opals/config.hpp"
4
#include "opals/Vector.hpp"
5
#include "opals/Array.hpp"
6
#include "opals/Path.hpp"
7
#include "opals/DataSetType.hpp"
8
#include "opals/AttributeBandDescription.hpp"
9
#include "opals/IndexDescription.hpp"
10
11
namespace
opals
12
{
13
/// \brief DataSetStats provides generic information about a data file (use in opalsInfo).
14
///
15
/// Beside the name, type, storage size (in bytes) and a nodata indicator of the attribute the
16
/// class provides basic statistic information such as min, max, mean and the standard deviation.
17
/// If a specific information is really set, can be retrieved by the corresponding isSet function.
18
/// Depending on the data type a specific no data value is used to indicate unset values.
19
///
20
/// \author JO
21
/// \date 24.05.2012
22
class
OPALS_API
DataSetStats
23
{
24
public
:
25
static
DataSetStats
merge(
Vector<DataSetStats>
&stats,
bool
mergeFilenames);
26
27
28
typedef
Array<double,6>
ArrayD6
;
29
typedef
Vector< AttributeBandDescription >
AttributeVector
;
30
typedef
Vector< IndexDescription >
IndexVector
;
31
typedef
Vector< String >
StringVector
;
32
typedef
Array<double,2>
ArrayD2
;
33
typedef
Array<unsigned, 2>
ArrayU2
;
34
35
DataSetStats
();
36
~
DataSetStats
();
37
38
void
reset();
39
40
// isSet functions ================================================
41
bool
hasValueFrequency()
const
;
42
43
//common part
44
bool
isSetFilename()
const
;
45
bool
isSetType()
const
;
46
bool
isSetVersion()
const
;
47
bool
isSetCreator()
const
;
48
bool
isSetBoundingBox()
const
;
49
bool
isSetCoordRefSys()
const
;
50
// odm part
51
bool
isSetPointCount()
const
;
52
bool
isSetLineCount()
const
;
53
bool
isSetPolygonCount()
const
;
54
bool
isSetBoundaryPolygon()
const
;
55
bool
isSetPointDensity()
const
;
56
bool
isSetAttributes()
const
;
57
bool
isSetIndices()
const
;
58
//Raster Part
59
bool
isSetPixelCount()
const
;
60
bool
isSetRasterDimension()
const
;
61
bool
isSetBands()
const
;
62
bool
isSetPixelSize()
const
;
63
bool
isSetCompression()
const
;
64
bool
isSetInterleave()
const
;
65
bool
isSetErrorMessage()
const
;
66
67
// Get functions ================================================
68
//common part
69
Path
getFilename()
const
;
70
DataSetType
getType()
const
;
71
String
getVersion()
const
;
72
String
getCreator()
const
;
73
ArrayD6
getBoundingBox()
const
;
74
int
getBoundingBoxDim()
const
;
75
String
getCoordRefSys()
const
;
76
// odm part
77
long
long
getPointCount()
const
;
78
long
long
getLineCount()
const
;
79
long
long
getPolygonCount()
const
;
80
StringVector
getBoundaryPolygon()
const
;
81
double
getPointDensity()
const
;
82
AttributeVector
getAttributes()
const
;
83
IndexVector
getIndices()
const
;
///< get info object about the spatial indices
84
//Raster Part
85
long
long
getPixelCount()
const
;
86
AttributeVector
getBands()
const
;
87
ArrayD2
getPixelSize()
const
;
88
ArrayU2
getRasterDimension()
const
;
89
bool
getPixelAreaOrPointFlag()
const
;
90
String
getCompression()
const
;
91
String
getInterleave()
const
;
92
String
getErrorMessage()
const
;
93
94
// set functions ================================================
95
//common part
96
void
setFilename(
const
Path
& Filename);
97
void
setType(
const
DataSetType
&Type);
98
void
setVersion(
const
String
&Version);
99
void
setCreator(
const
String
& Creator);
100
void
setBoundingBox(
const
ArrayD6
& BoundingBox);
101
void
setBoundingBoxDim(
const
int
& BoundingBoxDim);
102
void
setCoordRefSys(
const
String
& crs);
103
// odm part
104
void
setPointCount(
const
long
long
& PointCount);
105
void
setLineCount(
const
long
long
& LineCount);
106
void
setPolygonCount(
const
long
long
& PolygonCount);
107
void
setBoundaryPolygon(
const
StringVector
& BoundaryPolygon);
108
void
setPointDensity(
const
double
&PointDensity);
109
void
setAttributes(
const
AttributeVector
& Attributes);
110
void
setIndices(
const
IndexVector
& Indecs);
111
//Raster Part
112
void
setPixelCount(
const
long
long
& PixelCount);
113
void
setBands(
const
AttributeVector
& Bands) ;
114
void
setPixelSize(
const
ArrayD2
& PixelSize);
115
void
setRasterDimension(
const
ArrayU2
& dim);
116
void
setPixelAreaOrPointFlag(
const
bool
& PixelAreaOrPointFlag);
117
void
setCompression(
const
String
& Compression);
118
void
setInterleave(
const
String
& Interleave);
119
void
setErrorMessage(
const
String
& errorMessage);
120
121
String
logDataSetStats(
int
precision=3)
const
;
///< for xml output
122
String
printDataSetStats()
const
;
///< for log output (in more readable format)
123
String
printValueFrequency()
const
;
///< for log output (in more readable format)
124
125
private
:
126
Path
filename;
127
DataSetType
type;
128
String
version;
129
130
long
long
pointCount;
131
long
long
lineCount;
132
long
long
polygonCount;
133
134
ArrayD6
boundingBox;
135
int
boundingBoxDim;
136
137
StringVector
boundaryPolygon;
138
double
pointDensity;
139
140
String
creator;
141
String
coordRefSys;
142
143
AttributeVector
attributes;
144
IndexVector
indices;
145
146
long
long
pixelcount;
147
AttributeVector
bands;
148
149
ArrayD2
pixelsize;
150
ArrayU2
rasterdim;
151
bool
pixelareaorpointflag;
152
String
compression;
153
String
interleave;
154
155
String
errorMessage;
156
};
157
}
opals::Array< double, 6 >
opals::DataSetType
DataSetType
Possible data set types as used in DataSetStats (see opalsInfo)
Definition:
DataSetType.hpp:8
opals::Path
A file/directory path.
Definition:
Path.hpp:26
opals
Contains the public interface of OPALS.
Definition:
AbsValueOrQuantile.hpp:8
opals::Vector
Mimics std::vector<T>
Definition:
fwd.hpp:18
opals::DataSetStats
DataSetStats provides generic information about a data file (use in opalsInfo).
Definition:
DataSetStats.hpp:22
opals::String
A dynamic character string whose interface conforms to STL's std::string.
Definition:
String.hpp:35