| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/gdal/TeGDALDecoder.h
Go to the documentation of this file.

    00001 /************************************************************************************
    00002 TerraLib - a library for developing GIS applications.
    00003 Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
    00004
    00005 This code is part of the TerraLib library.
    00006 This library is free software; you can redistribute it and/or
    00007 modify it under the terms of the GNU Lesser General Public
    00008 License as published by the Free Software Foundation; either
    00009 version 2.1 of the License, or (at your option) any later version.
    00010
    00011 You should have received a copy of the GNU Lesser General Public
    00012 License along with this library.
    00013
    00014 The authors reassure the license terms regarding the warranties.
    00015 They specifically disclaim any warranties, including, but not limited to,
    00016 the implied warranties of merchantability and fitness for a particular purpose.
    00017 The library provided hereunder is on an "as is" basis, and the authors have no
    00018 obligation to provide maintenance, support, updates, enhancements, or modifications.
    00019 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
    00020 indirect, special, incidental, or consequential damages arising out of the use
    00021 of this library and its documentation.
    00022 *************************************************************************************/
    00023
    00029 #ifndef _TEGDALDRIVER_H
    00030 #define _TEGDALDRIVER_H
    00031
    00032 // Defines
    00033 #include "TeGDALDefines.h"
    00034
    00035 // TerraLib include files
    00036 #include "../../kernel/TeDecoderVirtualMemory.h"
    00037
    00038 // STL include files
    00039 #include <vector>
    00040 #include <string>
    00041
    00042 // forward declarations;
    00043 class GDALDataset;
    00044
    00046 class TEGDAL_DLL TeGDALDriverInfo
    00047 {
    00048
    00049 public:
    00050
    00051            TeGDALDriverInfo();
    00052            ~TeGDALDriverInfo();
    00053
    00054            const std::string& getId() const;
    00055            const std::string& getFullName() const;
    00056            const std::string& getExtension() const;
    00057            bool hasCreateSupport() const;
    00058
    00059            void setId(const std::string& id);
    00060            void setFullName(const std::string& n);
    00061            void setExtension(const std::string& e);
    00062            void setCreateSupport(bool b);
    00063
    00064            void print() const;
    00065
    00066            std::string getFilter() const;
    00067
    00068 private:
    00069
    00070            std::string _id;
    00071            std::string _fullName;
    00072            std::string _extension;
    00073            bool _hasCreateSupport;
    00074 };
    00075
    00076 class TEGDAL_DLL TeGDALDecoder : public TeDecoderVirtualMemory
    00077 {
    00078
    00079 public:
    00080
    00081            TeGDALDecoder();
    00082
    00083            TeGDALDecoder(const TeRasterParams& par);
    00084
    00085            ~TeGDALDecoder();
    00086
    00088            void init();
    00089
    00091            bool clear();
    00092
    00094            bool setElement(int col, int lin, double val, int band = 0);
    00095
    00097            //bool getElement(int col, int lin, double &val, int band = 0);
    00098
    00100            static void initialize();
    00101
    00107            static std::string getGDALDriverName(const std::string& extension);
    00108
    00109            static const std::vector<TeGDALDriverInfo>& getGDALDrivers();
    00110
    00111            static std::string getSupportedFilesFilter();
    00112
    00113 protected:
    00114
    00115            virtual bool getRasterBlock(const TeBlockIndex& index, void* buf);
    00116            virtual bool putRasterBlock(const TeBlockIndex& index, void* buf, long bsize);
    00117
    00118 protected:
    00119
    00121            GDALDataset* _gdalDS;
    00122
    00124            static std::vector<TeGDALDriverInfo> _gdalDrivers;
    00125
    00126 private:
    00127
    00128     TeGDALDecoder(const TeGDALDecoder& source);
    00129
    00130     TeGDALDecoder& operator=(const TeGDALDecoder& source);
    00131 };
    00132
    00134 class TEGDAL_DLL TeGDALDecoderFactory : public TeDecoderFactory
    00135 {
    00136 public:
    00137
    00139            TeGDALDecoderFactory(const string& name);
    00140
    00142            TeDecoder* build (const TeRasterParams& arg)
    00143            {  return new TeGDALDecoder(arg); }
    00144 };
    00145
    00146 #endif // _TEGDALDRIVER_H

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines