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