| 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/shapelib/TeQuerierSHP.h
Go to the documentation of this file.

    00001 /************************************************************************************
    00002 TerraLib - a library for developing GIS applications.
    00003 Copyright © 2001-2004 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 *************************************************************************************/
    00028 #ifndef  __TERRALIB_INTERNAL_QUERIER_SHP_H
    00029 #define  __TERRALIB_INTERNAL_QUERIER_SHP_H
    00030
    00031 #include "TeQuerierImpl.h"
    00032 #include <shapefil.h>
    00033
    00045 class TeQuerierSHP : public TeQuerierImpl
    00046 {
    00047
    00048 protected:
    00049
    00050            SHPHandle  hSHP;
    00051            DBFHandle  hDBF;
    00052            int                              nEntities;
    00053            int                              curEntity;
    00054            int                              nShapeType;
    00055
    00056 public:
    00057
    00059                       TeQuerierSHP(TeQuerierParams* params):
    00060                                  TeQuerierImpl(params),
    00061                                  nEntities(0),
    00062                                  curEntity(0),
    00063                                  nShapeType()
    00064                       { }
    00065
    00066
    00068                       string fileName () { return params_->fileName(); }
    00069
    00071                       bool loadInstances(TeTSEntry* ent = 0);
    00072
    00074                       bool fetchInstance(TeSTInstance& stoi);
    00075
    00077                       bool loadGeometries(TeMultiGeometry& geometries, unsigned int& index);
    00078
    00080                       bool loadGeometries(TeMultiGeometry& geometries);
    00081 };
    00082
    00083
    00090 class TeQuerierSHPFactory : public TeQuerierImplFactory
    00091 {
    00092 public:
    00093
    00095            TeQuerierSHPFactory(const string& name) : TeQuerierImplFactory(name) {}
    00096
    00098            virtual TeQuerierImpl* build (const TeQuerierParams& arg)
    00099            {
    00100                       TeQuerierParams* tempArg = new TeQuerierParams();
    00101                       *tempArg = arg;
    00102                       return new TeQuerierSHP(tempArg);
    00103            }
    00104 };
    00105
    00110 namespace
    00111 {
    00112   static TeQuerierSHPFactory querierSHP("querierSHP");
    00113 };
    00114
    00115
    00116 #endif
    00117
    00118

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines