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