MultiLineString.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/MultiLineString.h
22 
23  \brief MultiLineString is a MultiCurve whose elements are LineStrings.
24 */
25 
26 #ifndef __TERRALIB_GEOMETRY_INTERNAL_MULTILINESTRING_H
27 #define __TERRALIB_GEOMETRY_INTERNAL_MULTILINESTRING_H
28 
29 // TerraLib
30 #include "MultiCurve.h"
31 
32 namespace te
33 {
34  namespace gm
35  {
36  /*!
37  \class MultiLineString
38 
39  \brief MultiLineString is a MultiCurve whose elements are LineStrings.
40 
41  \ingroup geometry
42 
43  \sa Geometry,
44  AbstractPoint, Point, PointM, PointZ, PointZM, PointKd,
45  Curve, LineString, LinearRing, Line, CircularString, CompoundCurve,
46  Surface, Polygon, Triangle, CurvePolygon, PolyhedralSurface, TIN,
47  GeometryCollection, MultiCurve, MultiSurface
48  MultiPoint, MultiPolygon
49 
50  */
52  {
53  public:
54 
56 
57  /** @name Initializer methods on geometric objects
58  * Methods for initializing a geometric object.
59  */
60  //@{
61 
62  /*!
63  \brief It initializes the multi line string with the specified spatial reference system id and envelope.
64 
65  \param nGeom The number of geometries in the collection.
66  \param t The internal type of the multi line string.
67  \param srid The Spatial Reference System ID associated to the multi line string.
68  \param mbr The minimum bounding rectangle of this geometry (i.e., its envelope).
69 
70  \note The multi line string will take the ownership of the given mbr.
71  */
72  MultiLineString(std::size_t nGeom, GeomType t, int srid = 0, Envelope* mbr = 0);
73 
74  /*!
75  \brief Copy constructor.
76 
77  \param rhs The other geometry.
78  */
79  MultiLineString(const MultiLineString& rhs);
80 
81  /*! \brief Destructor. */
83 
84  /*!
85  \brief Assignment operator.
86 
87  \param rhs The other geometry.
88 
89  \return A reference for this.
90  */
91  MultiLineString& operator=(const MultiLineString& rhs);
92 
93  //@}
94 
95  /** @name Re-Implementation from AbstractData
96  * Methods re-Implementated from AbstractData.
97  */
98  //@{
99 
100  /*!
101  \brief It clones the linestring.
102 
103  \return A copy of the given linestring.
104 
105  \note The caller of this method will take the ownership of the returned linestring.
106 
107  \note The cloned linestring will not have the
108  MBR computed. This will save time when you
109  are just cloning a geometry and don't intend
110  to waste time computing the bounding box.
111  If you have another suggestion, please, let me know.
112  */
113  te::dt::AbstractData* clone() const;
114 
115  //@}
116 
117  /** @name Re-Implmentation of methods from Geometry class
118  * Re-Implmentation of basic methods from Geometry class.
119  */
120  //@{
121 
122  /*!
123  \brief The name of the Geometry subtype is: MultiLineString.
124 
125  \return The name of the Geometry subtype is: MultiLineString.
126  */
127  const std::string& getGeometryType() const throw();
128 
129  /*!
130  \brief It returns a derived geometry collection value according to the range of coordinate values inclusively.
131 
132  \param mStart The initial coordinate value.
133  \param mEnd The final coordinate value.
134 
135  \return A GeometryCollection value.
136 
137  \exception Exception It will throw an exception if the operation could not be performed.
138 
139  \note This method only applies to Point and Line geometries, including homogeneous collections of points or lines.
140  For polygons this will return a NULL value.
141 
142  \note The caller of this method will take the ownership of the returned Geometry.
143  */
144  Geometry* locateBetween(const double& mStart, const double& mEnd) const throw(Exception);
145 
146  //@}
147 
148  private:
149 
150  static const std::string sm_typeName; //!< Geometry type name for MultiLineString.
151  };
152 
153  } // end namespace gm
154 } // end namespace te
155 
156 #endif // __TERRALIB_GEOMETRY_INTERNAL_MULTILINESTRING_H
157 
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
Definition: Enums.h:41
Base exception class for plugin module.
Definition: Exception.h:42
~MultiLineString()
Destructor.
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:76
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
URI C++ Library.
A base class for values that can be retrieved from the data access module.
Definition: AbstractData.h:57
MultiCurve is a class that represents a 1-dimensional GeometryCollection whose elements are curves...
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:74
MultiLineString is a MultiCurve whose elements are LineStrings.
MultiCurve is a class that represents a 1-dimensional GeometryCollection whose elements are curves...
Definition: MultiCurve.h:50