Loading...
Searching...
No Matches
Raster.h
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/terralib4/Raster.h
22
23 \brief Raster implementaton for TerraLib 4.x.
24*/
25
26#ifndef __TERRALIB_TERRALIB4_INTERNAL_RASTER_H
27#define __TERRALIB_TERRALIB4_INTERNAL_RASTER_H
28
29// TerraLib
30#include "../raster/Raster.h"
31
32class TeRaster;
33
34namespace terralib4
35{
36 class Raster: public te::rst::Raster
37 {
38 public:
39
40 Raster(TeRaster* iraster);
41
43
45
46 void open(const std::map<std::string, std::string>& rinfo,
48
49 std::map<std::string, std::string> getInfo() const;
50
51 std::size_t getNumberOfBands() const;
52
53 int getBandDataType(std::size_t i) const;
54
55 const te::rst::Band* getBand(std::size_t i) const;
56
57 te::rst::Band* getBand(std::size_t i);
58
59 const te::rst::Band& operator[](std::size_t i) const;
60
61 te::rst::Band& operator[](std::size_t i);
62
64
65 bool createMultiResolution( const unsigned int, const te::rst::InterpolationMethod )
66 {
67 return false;
68 };
69
70 bool removeMultiResolution() { return false; };
71
72 unsigned int getMultiResLevelsCount() const
73 {
74 return 0;
75 }
76
77 te::rst::Raster* getMultiResLevel( const unsigned int ) const
78 {
79 return 0;
80 }
81
82 private:
83
84 class Impl;
85
86 Impl* m_pImpl;
87 };
88
89} // end namespace terralib4
90
91#endif //__TERRALIB_TERRALIB4_INTERNAL_RASTER_H
A base class for values that can be retrieved from the data access module.
Definition: AbstractData.h:56
A raster band description.
Definition: Band.h:64
A rectified grid is the spatial support for raster data.
Definition: Grid.h:69
An abstract class for raster data strucutures.
Definition: Raster.h:72
bool removeMultiResolution()
Remove/Destroy a sub-sampled multi-resolution pyramid, if there is one.
Definition: Raster.h:70
unsigned int getMultiResLevelsCount() const
Returns the current number of multi-resolution pyramid levels.
Definition: Raster.h:72
Raster(te::rst::Grid *grid, te::common::AccessPolicy p=te::common::RAccess)
te::rst::Raster * getMultiResLevel(const unsigned int) const
Returns the required level of a multi-resolution pyramid or NULL if that level does not exists.
Definition: Raster.h:77
te::dt::AbstractData * clone() const
It returns a clone of this object.
Raster(TeRaster *iraster)
te::rst::Band * getBand(std::size_t i)
Returns the raster i-th band.
int getBandDataType(std::size_t i) const
Returns the data type in a particular band (or dimension).
const te::rst::Band & operator[](std::size_t i) const
Access band in i position.
const te::rst::Band * getBand(std::size_t i) const
Returns the raster i-th band.
std::map< std::string, std::string > getInfo() const
It returns additional information about the raster.
te::rst::Band & operator[](std::size_t i)
Access band in i position.
void open(const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
Opens a raster.
Impl * m_pImpl
Definition: Raster.h:86
~Raster()
Virtual destructor.
bool createMultiResolution(const unsigned int, const te::rst::InterpolationMethod)
Create a sub-sampled multi-resolution pyramid.
Definition: Raster.h:65
std::size_t getNumberOfBands() const
Returns the number of bands (dimension of cells attribute values) in the raster.
AccessPolicy
Supported data access policies (can be used as bitfield).
Definition: Enums.h:41
@ RAccess
Definition: Enums.h:43
InterpolationMethod
Allowed interpolation methods.
Definition: Enums.h:93
Definition: Band.h:35