GeomReader.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/GeomReader.h
22 
23  \brief An utility class for converting a TerraLib 4.x geometry to a TerraLib 5.
24 */
25 
26 #ifndef __TERRALIB_TERRALIB4_INTERNAL_GEOMREADER_H
27 #define __TERRALIB_TERRALIB4_INTERNAL_GEOMREADER_H
28 
29 // TerraLib 5
30 #include "../common/Static.h"
31 #include "../geometry/Enums.h"
32 #include "Config.h"
33 
34 // STL
35 #include <memory>
36 
37 // Forward declarations
38 #include "../geometry_fw.h"
39 
40 class TeCell;
41 class TeGeometry;
42 class TeLine2D;
43 class TeLinearRing;
44 class TeLineSet;
45 class TePoint;
46 class TePolygon;
47 class TePolygonSet;
48 class TePointSet;
49 
50 namespace terralib4
51 {
52  /*!
53  \class EWKBReader
54 
55  \brief An utility class for reading a TerraLib 4.x geometry.
56  */
58  {
59  public:
60 
61  static std::auto_ptr<te::gm::Point> getPoint(const TePoint& pt);
62 
63  static std::auto_ptr<te::gm::LineString> getLineString(const TeLine2D& line);
64 
65  static std::auto_ptr<te::gm::LinearRing> getLinearRing(const TeLinearRing& ring);
66 
67  static std::auto_ptr<te::gm::Polygon> getPolygon(const TePolygon& poly);
68 
69  static std::auto_ptr<te::gm::MultiPolygon> getMultiPolygon(const TePolygonSet& polySet);
70 
71  static std::auto_ptr<te::gm::MultiLineString> getMultiLineString(const TeLineSet& lineSet);
72 
73  static std::auto_ptr<te::gm::MultiPoint> getMultiPoint(const TePointSet& pointSet);
74 
75  static std::auto_ptr<te::gm::Polygon> getPolygon(const TeCell& cell);
76 
77  static std::auto_ptr<te::gm::Geometry> getGeometry(const TeGeometry& geom);
78  };
79 } // end namespace terralib4
80 
81 #endif // __TERRALIB_TERRALIB4_INTERNAL_GEOMREADER_H
static std::auto_ptr< te::gm::Polygon > getPolygon(const TePolygon &poly)
static std::auto_ptr< te::gm::MultiLineString > getMultiLineString(const TeLineSet &lineSet)
static std::auto_ptr< te::gm::Point > getPoint(const TePoint &pt)
Configuration flags for the TerraLib 4 driver.
static std::auto_ptr< te::gm::LinearRing > getLinearRing(const TeLinearRing &ring)
Definition: Band.h:34
static std::auto_ptr< te::gm::Geometry > getGeometry(const TeGeometry &geom)
static std::auto_ptr< te::gm::MultiPolygon > getMultiPolygon(const TePolygonSet &polySet)
static std::auto_ptr< te::gm::LineString > getLineString(const TeLine2D &line)
static std::auto_ptr< te::gm::MultiPoint > getMultiPoint(const TePointSet &pointSet)
A base type for static classes.
Definition: Static.h:43