Loading...
Searching...
No Matches
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
40class TeCell;
41class TeGeometry;
42class TeLine2D;
43class TeLinearRing;
44class TeLineSet;
45class TePoint;
46class TePolygon;
47class TePolygonSet;
48class TePointSet;
49
50namespace 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::unique_ptr<te::gm::Point> getPoint(const TePoint& pt);
62
63 static std::unique_ptr<te::gm::LineString> getLineString(const TeLine2D& line);
64
65 static std::unique_ptr<te::gm::LinearRing> getLinearRing(const TeLinearRing& ring);
66
67 static std::unique_ptr<te::gm::Polygon> getPolygon(const TePolygon& poly);
68
69 static std::unique_ptr<te::gm::MultiPolygon> getMultiPolygon(const TePolygonSet& polySet);
70
71 static std::unique_ptr<te::gm::MultiLineString> getMultiLineString(const TeLineSet& lineSet);
72
73 static std::unique_ptr<te::gm::MultiPoint> getMultiPoint(const TePointSet& pointSet);
74
75 static std::unique_ptr<te::gm::Polygon> getPolygon(const TeCell& cell);
76
77 static std::unique_ptr<te::gm::Geometry> getGeometry(const TeGeometry& geom);
78 };
79} // end namespace terralib4
80
81#endif // __TERRALIB_TERRALIB4_INTERNAL_GEOMREADER_H
A base type for static classes.
Definition: Static.h:44
static std::unique_ptr< te::gm::LinearRing > getLinearRing(const TeLinearRing &ring)
static std::unique_ptr< te::gm::Polygon > getPolygon(const TeCell &cell)
static std::unique_ptr< te::gm::MultiLineString > getMultiLineString(const TeLineSet &lineSet)
static std::unique_ptr< te::gm::Point > getPoint(const TePoint &pt)
static std::unique_ptr< te::gm::MultiPolygon > getMultiPolygon(const TePolygonSet &polySet)
static std::unique_ptr< te::gm::LineString > getLineString(const TeLine2D &line)
static std::unique_ptr< te::gm::Geometry > getGeometry(const TeGeometry &geom)
static std::unique_ptr< te::gm::Polygon > getPolygon(const TePolygon &poly)
static std::unique_ptr< te::gm::MultiPoint > getMultiPoint(const TePointSet &pointSet)
Definition: Band.h:35
Proxy configuration file for TerraView (see terraview_config.h).