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
typedef
Array<double,6>
ArrayD6
;
26
typedef
Vector< AttributeBandDescription >
AttributeVector
;
27
typedef
Vector< IndexDescription >
IndexVector
;
28
typedef
Vector< String >
StringVector
;
29
typedef
Array<double,2>
ArrayD2
;
30
typedef
Array<unsigned, 2>
ArrayU2
;
31
32
DataSetStats
();
33
~
DataSetStats
();
34
35
void
reset();
36
37
// isSet functions ================================================
38
bool
hasValueFrequency()
const
;
39
40
//common part
41
bool
isSetFilename()
const
;
42
bool
isSetType()
const
;
43
bool
isSetVersion()
const
;
44
bool
isSetCreator()
const
;
45
bool
isSetBoundingBox()
const
;
46
bool
isSetCoordRefSys()
const
;
47
// odm part
48
bool
isSetPointCount()
const
;
49
bool
isSetLineCount()
const
;
50
bool
isSetPolygonCount()
const
;
51
bool
isSetBoundaryPolygon()
const
;
52
bool
isSetPointDensity()
const
;
53
bool
isSetAttributes()
const
;
54
bool
isSetIndices()
const
;
55
//Raster Part
56
bool
isSetPixelCount()
const
;
57
bool
isSetRasterDimension()
const
;
58
bool
isSetBands()
const
;
59
bool
isSetPixelSize()
const
;
60
bool
isSetCompression()
const
;
61
bool
isSetInterleave()
const
;
62
63
// Get functions ================================================
64
//common part
65
Path
getFilename()
const
;
66
DataSetType
getType()
const
;
67
String
getVersion()
const
;
68
String
getCreator()
const
;
69
ArrayD6
getBoundingBox()
const
;
70
int
getBoundingBoxDim()
const
;
71
String
getCoordRefSys()
const
;
72
// odm part
73
long
long
getPointCount()
const
;
74
long
long
getLineCount()
const
;
75
long
long
getPolygonCount()
const
;
76
StringVector
getBoundaryPolygon()
const
;
77
double
getPointDensity()
const
;
78
AttributeVector
getAttributes()
const
;
79
IndexVector
getIndices()
const
;
///< get info object about the spatial indices
80
//Raster Part
81
long
long
getPixelCount()
const
;
82
AttributeVector
getBands()
const
;
83
ArrayD2
getPixelSize()
const
;
84
ArrayU2
getRasterDimension()
const
;
85
bool
getPixelAreaOrPointFlag()
const
;
86
String
getCompression()
const
;
87
String
getInterleave()
const
;
88
89
90
// set functions ================================================
91
//common part
92
void
setFilename(
const
Path
& Filename);
93
void
setType(
const
DataSetType
&Type);
94
void
setVersion(
const
String
&Version);
95
void
setCreator(
const
String
& Creator);
96
void
setBoundingBox(
const
ArrayD6
& BoundingBox);
97
void
setBoundingBoxDim(
const
int
& BoundingBoxDim);
98
void
setCoordRefSys(
const
String
& crs);
99
// odm part
100
void
setPointCount(
const
long
long
& PointCount);
101
void
setLineCount(
const
long
long
& LineCount);
102
void
setPolygonCount(
const
long
long
& PolygonCount);
103
void
setBoundaryPolygon(
const
StringVector
& BoundaryPolygon);
104
void
setPointDensity(
const
double
&PointDensity);
105
void
setAttributes(
const
AttributeVector
& Attributes);
106
void
setIndices(
const
IndexVector
& Indecs);
107
//Raster Part
108
void
setPixelCount(
const
long
long
& PixelCount);
109
void
setBands(
const
AttributeVector
& Bands) ;
110
void
setPixelSize(
const
ArrayD2
& PixelSize);
111
void
setRasterDimension(
const
ArrayU2
& dim);
112
void
setPixelAreaOrPointFlag(
const
bool
& PixelAreaOrPointFlag);
113
void
setCompression(
const
String
& Compression);
114
void
setInterleave(
const
String
& Interleave);
115
116
String
logDataSetStats()
const
;
///< for xml output
117
String
printDataSetStats()
const
;
///< for log output (in more readable format)
118
String
printValueFrequency()
const
;
///< for log output (in more readable format)
119
120
private
:
121
Path
filename;
122
DataSetType
type;
123
String
version;
124
125
long
long
pointCount;
126
long
long
lineCount;
127
long
long
polygonCount;
128
129
ArrayD6
boundingBox;
130
int
boundingBoxDim;
131
132
StringVector
boundaryPolygon;
133
double
pointDensity;
134
135
String
creator;
136
String
coordRefSys;
137
138
AttributeVector
attributes;
139
IndexVector
indices;
140
141
long
long
pixelcount;
142
AttributeVector
bands;
143
144
ArrayD2
pixelsize;
145
ArrayU2
rasterdim;
146
bool
pixelareaorpointflag;
147
String
compression;
148
String
interleave;
149
150
};
151
}
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< AttributeBandDescription >
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