Loading...
Searching...
No Matches
TIN.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/geometry/TIN.h
22
23 \brief TIN (triangulated irregular network) is a PolyhedralSurface consisting only of Triangle patches.
24*/
25
26#ifndef __TERRALIB_GEOMETRY_INTERNAL_TIN_H
27#define __TERRALIB_GEOMETRY_INTERNAL_TIN_H
28
29// TerraLib
30#include "PolyhedralSurface.h"
31
32namespace te
33{
34 namespace gm
35 {
36 /*!
37 \class TIN
38
39 \brief TIN (triangulated irregular network) is a PolyhedralSurface consisting only of Triangle patches.
40
41 \ingroup geometry
42
43 \sa Geometry,
44 Point,
45 Curve, LineString, LinearRing,
46 Surface, Polygon, Triangle, PolyhedralSurface
47 GeometryCollection, MultiSurface, MultiCurve,
48 MultiPoint, MultiLineString, MultiPolygon
49 */
51 {
52 public:
53
55
56 /** @name Initializer methods on geometric objects
57 * Methods for initializing a geometric object.
58 */
59 //@{
60
61 /*!
62 \brief It initializes the TIN with the specified spatial reference system id and envelope.
63
64 \param nPolygons The number of polygons forming the polyhedral.
65 \param t The internal type of the TIN.
66 \param srid The Spatial Reference System ID associated to the Geometry.
67 \param mbr The minimum bounding rectangle of this geometry (i.e., its envelope).
68
69 \note The TIN will take the ownership of the given mbr.
70 */
71 TIN(std::size_t nPolygons, GeomType t, int srid = 0, Envelope* mbr = 0);
72
73 /*!
74 \brief Copy constructor.
75
76 \param rhs The other geometry.
77 */
78 TIN(const TIN& rhs);
79
80 /*! \brief Destructor. */
81 ~TIN() { }
82
83 /*!
84 \brief Assignment operator.
85
86 \param rhs The other geometry.
87
88 \return A reference for this.
89 */
90 TIN& operator=(const TIN& rhs);
91
92 //@}
93
94 /** @name Re-Implmentation of methods from Geometry class
95 * Re-Implmentation of basic methods from Geometry class.
96 */
97 //@{
98
99 /*!
100 \brief It returns the name of the instantiable subtype of Geometry of which this geometric object is an instantiable member.
101
102 The name of the Geometry subtype for PolyhedralSurface is: Tin.
103
104 \return The name of the instantiable subtype of Geometry of which this geometric object is an instantiable member. In this case, it returns Polygon.
105 */
106 const std::string& getGeometryType() const throw();
107
108 //@}
109
110 /*!
111 \brief It sets the n-th triangle in this TIN.
112
113 \param i The index of the given polygon element.
114 \param g The polygon that will be placed on the position indicated by index.
115
116 \note It doesn't check the index range.
117
118 \note TerraLib extended method.
119 */
120 void setGeometryN(std::size_t i, te::gm::Polygon* g);
121
122 /*!
123 \brief It adds the triangle into the TIN.
124
125 \param g The geometry you want to add to the TIN.
126
127 \note TerraLib extended method.
128 */
129 void add(te::gm::Polygon* g);
130
131 private:
132
133 static const std::string sm_typeName; //!< Geometry type name for TIN.
134 };
135
136 } // end namespace gm
137} // end namespace te
138
139#endif // __TERRALIB_GEOMETRY_INTERNAL_TIN_H
140
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
PolyhedralSurface is a contiguous collection of polygons, which share common boundary segments.
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
Definition: Polygon.h:51
PolyhedralSurface is a contiguous collection of polygons, which share common boundary segments.
TIN (triangulated irregular network) is a PolyhedralSurface consisting only of Triangle patches.
Definition: TIN.h:51
~TIN()
Destructor.
Definition: TIN.h:81
TIN(std::size_t nPolygons, GeomType t, int srid=0, Envelope *mbr=0)
It initializes the TIN with the specified spatial reference system id and envelope.
TIN & operator=(const TIN &rhs)
Assignment operator.
TIN(const TIN &rhs)
Copy constructor.
const std::string & getGeometryType() const
It returns the name of the instantiable subtype of Geometry of which this geometric object is an inst...
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
Definition: Enums.h:42
TerraLib.
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:76