BandProperty.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/raster/BandProperty.cpp
22 
23  \brief It describes the range of one dimension of a raster.
24 */
25 
26 // TerraLib
27 #include "../common/UnitOfMeasure.h"
28 #include "../datatype/Enums.h"
29 #include "BandProperty.h"
30 #include "Enums.h"
31 
32 // STL
33 #include <limits>
34 
35 te::rst::BandProperty::BandProperty(std::size_t idx, int t, const std::string& desc)
36  : m_idx(idx),
37  m_type(t),
38  m_description(desc),
39  m_noDataValue(std::numeric_limits<double>::max()),
40  m_valuesOffset(0.0, 0.0),
41  m_valuesScale(1.0, 0.0),
42  m_colorInterp(te::rst::UndefCInt),
43  m_paletteInterp(te::rst::UndefPalInt),
44  m_blkw(0),
45  m_blkh(0),
46  m_nblocksx(0),
47  m_nblocksy(0),
48  m_min( std::numeric_limits<double>::max() ),
49  m_max( std::numeric_limits<double>::max() ),
50  m_mean( std::numeric_limits<double>::max() ),
51  m_stdDev( std::numeric_limits<double>::max() )
52 {
53 }
54 
56 
57  = default;
58 
60 
62 {
63  if(this != &rhs)
64  {
65  m_idx = rhs.m_idx;
66  m_type = rhs.m_type;
68  m_metadata = rhs.m_metadata;
75  m_palette = rhs.m_palette;
76  m_blkw = rhs.m_blkw;
77  m_blkh = rhs.m_blkh;
78  m_nblocksx = rhs.m_nblocksx;
79  m_nblocksy = rhs.m_nblocksy;
80  m_unit = rhs.m_unit;
81  m_min = rhs.m_min;
82  m_max = rhs.m_max;
83  m_mean = rhs.m_mean;
84  m_stdDev = rhs.m_stdDev;
85  }
86 
87  return *this;
88 }
89 
91 {
94 }
double m_stdDev
Standard deviation of all pixel values (default is std::numeric_limits<double>::max() which means no ...
Definition: BandProperty.h:150
std::size_t m_idx
The band index.
Definition: BandProperty.h:132
It describes one band (or dimension) of a raster.
std::vector< ColorEntry > m_palette
The color palette.
Definition: BandProperty.h:142
std::vector< std::string > m_categoryNames
Set of categoric names for the values contained in a dimension.
Definition: BandProperty.h:139
A raster band description.
Definition: BandProperty.h:61
int m_nblocksx
The number of blocks in x.
Definition: BandProperty.h:145
int m_nblocksy
The number of blocks in y.
Definition: BandProperty.h:146
BandProperty(std::size_t idx, int t, const std::string &desc=std::string(""))
Constructor.
double m_min
Minimum pixel value (default is std::numeric_limits<double>::max() which means no value set)...
Definition: BandProperty.h:147
General enumerations for the data type module.
double m_mean
Mean of all pixel values (default is std::numeric_limits<double>::max() which means no value set)...
Definition: BandProperty.h:149
int m_type
The data type of the elements in the band ( See te::dt namespace basic data types for reference )...
Definition: BandProperty.h:133
double m_noDataValue
Value to indicate elements where there is no data, default is std::numeric_limits<double>::max().
Definition: BandProperty.h:136
double m_max
Maximum pixel value (default is std::numeric_limits<double>::max() which means no value set)...
Definition: BandProperty.h:148
bool isComplex() const
std::vector< std::pair< std::string, std::string > > m_metadata
A list of metadata where each element consists of a (key, value).
Definition: BandProperty.h:135
URI C++ Library.
Definition: Attributes.h:37
std::complex< double > m_valuesScale
Scale is the values (real and imaginary) which is multiplied to grid values for this sample dimension...
Definition: BandProperty.h:138
int m_blkw
Block width (pixels).
Definition: BandProperty.h:143
No color interpretation is associated with the band.
Undefined palette interpretation.
BandProperty & operator=(const BandProperty &rhs)
Assignment operator.
~BandProperty()
Destructor.
std::complex< double > m_valuesOffset
Offset is the values (real and imaginary) to add to grid values for this sample dimension, default is 0.
Definition: BandProperty.h:137
std::string m_description
A description.
Definition: BandProperty.h:134
te::common::UnitOfMeasurePtr m_unit
The unit of values.
Definition: BandProperty.h:154
int m_blkh
Block height (pixels).
Definition: BandProperty.h:144
ColorInterp m_colorInterp
The color interpretation.
Definition: BandProperty.h:140
PaletteInterpretation m_paletteInterp
Pallete interpretation.
Definition: BandProperty.h:141