Loading...
Searching...
No Matches
LinearRing.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/LinearRing.h
22
23 \brief A LinearRing is a LineString that is both closed and simple.
24*/
25
26#ifndef __TERRALIB_GEOMETRY_INTERNAL_LINEARRING_H
27#define __TERRALIB_GEOMETRY_INTERNAL_LINEARRING_H
28
29// TerraLib
30#include "LineString.h"
31
32namespace te
33{
34 namespace gm
35 {
36 /*!
37 \class LinearRing
38
39 \brief A LinearRing is a LineString that is both closed and simple.
40
41 Note that the boundary of a linear ring is empty. This class is
42 the basic building block of class Polygon.
43
44 \ingroup geometry
45
46 \sa Geometry,
47 AbstractPoint, Point, PointM, PointZ, PointZM,
48 Curve, LineString, Line, CircularString, CompoundCurve,
49 Surface, Polygon, Triangle, PolyhedralSurface, TIN,
50 GeometryCollection, MultiSurface, MultiCurve,
51 MultiPoint, MultiLineString, MultiPolygon
52 */
54 {
55 public:
56
58
59 /** @name Initializer methods on geometric objects
60 * Methods for initializing a geometric object.
61 */
62 //@{
63
64 /*!
65 \brief It initializes the linear ring with the specified spatial reference system id and envelope.
66
67 \param t The internal type of the linear ring.
68 \param srid The Spatial Reference System ID associated to the linear ring.
69 \param mbr The minimum bounding rectangle of this geometry (i.e., its envelope).
70
71 \note The Geometry will take the ownership of the given mbr.
72 */
73 LinearRing(GeomType t, int srid = 0, Envelope* mbr = 0);
74
75 /*!
76 \brief It initializes the linear ring with the specified spatial reference system id and envelope.
77
78 \param size The number of points in the linear ring. It must be a value greater than 0.
79 \param t The internal type of the Geometry.
80 \param srid The Spatial Reference System ID associated to the linear ring.
81 \param mbr The minimum bounding rectangle of this geometry (i.e., its envelope).
82
83 \note The linear ring will take the ownership of the given mbr.
84 */
85 LinearRing(std::size_t size, GeomType t, int srid = 0, Envelope* mbr = 0);
86
87 /*!
88 \brief Copy constructor.
89
90 \param rhs The other geometry.
91 */
93
94 /*! \brief Destructor. */
96
97 /*!
98 \brief Assignment operator.
99
100 \param rhs The other geometry.
101
102 \return A reference for this.
103 */
105
106 //@}
107
108 /** @name Re-Implementation from AbstractData
109 * Methods re-Implementated from AbstractData.
110 */
111 //@{
112
113 /*!
114 \brief It clones the linear ring.
115
116 \return A copy of the given linear ring.
117
118 \note The caller of this method will take the ownership of the returned linear ring.
119
120 \note The cloned linear ring will not have the
121 MBR computed. This will save time when you
122 are just cloning a geometry and don't intend
123 to waste time computing the bounding box.
124 If you have another suggestion, please, let me know.
125 */
127
128 //@}
129 };
130
131 } // end namespace gm
132} // end namespace te
133
134#endif // __TERRALIB_GEOMETRY_INTERNAL_LINEARRING_H
135
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
LineString is a curve with linear interpolation between points.
A base class for values that can be retrieved from the data access module.
Definition: AbstractData.h:56
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
LineString is a curve with linear interpolation between points.
Definition: LineString.h:65
A LinearRing is a LineString that is both closed and simple.
Definition: LinearRing.h:54
te::dt::AbstractData * clone() const
It clones the linear ring.
LinearRing(GeomType t, int srid=0, Envelope *mbr=0)
It initializes the linear ring with the specified spatial reference system id and envelope.
~LinearRing()
Destructor.
Definition: LinearRing.h:95
LinearRing(const LinearRing &rhs)
Copy constructor.
LinearRing(std::size_t size, GeomType t, int srid=0, Envelope *mbr=0)
It initializes the linear ring with the specified spatial reference system id and envelope.
LinearRing & operator=(const LinearRing &rhs)
Assignment operator.
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