openModeller  Version 1.5.0
TerralibRaster.hh
Go to the documentation of this file.
1 
31 #ifndef _TE_RASTERHH_
32 #define _TE_RASTERHH_
33 
35 
36 class TeRaster;
37 class TeDatabase;
38 class TeLayer;
39 class TeRasterParams;
40 class TeStringParser;
41 
42 #include <string>
43 using std::string;
44 
45 class MapFormat;
46 
48 
51 class dllexp TerralibRaster: public Raster
52 {
53 public:
55 
58  static Raster* CreateRasterCallback();
59 
61 
64  TerralibRaster(): db_(0), raster_(0), layer_(0), params_(0), te_str_parser_(0) {};
65 
67 
73  void createRaster( const std::string& str, int categ = 0 );
74 
76 
82  void createRaster( const std::string& str, const MapFormat& format );
83 
87  ~TerralibRaster();
88 
90 
93  int get( Coord x, Coord y, Scalar *val );
94 
96 
100  int put( Coord x, Coord y, Scalar val );
101 
103 
107  int put( Coord x, Coord y );
108 
114  int getMinMax( Scalar *min, Scalar *max );
115 
119  int deleteRaster();
120 
121 private:
125  TeDatabase *db_;
127  TeRaster *raster_;
128  TeRasterParams* params_;
129  TeLayer *layer_;
130 
133 
135  void openTeRaster();
136 
138  void createTeRaster();
139 };
140 
141 #endif
double Scalar
Type of map values.
Definition: om_defs.hh:39
Suport for a TerraLib Raster.
virtual int put(Coord px, Coord py, Scalar val)=0
A common interface to rasters.
Definition: Raster.hh:44
TeRasterParams * params_
virtual int getMinMax(Scalar *min, Scalar *max)=0
TerralibRaster()
Empty Constructor.
TeRaster * raster_
TeStringParser * te_str_parser_
TerraLib DataBase string parser.
double Coord
Type of map coordinates.
Definition: om_defs.hh:38
virtual int deleteRaster()=0
int min(int v1, int v2)
Definition: rules_base.cpp:56
virtual void createRaster(const std::string &source, int categ=0)=0