All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MultiPoint.cpp
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.cpp
22 
23  \brief MultiPoint is a GeometryCollection whose elements are restricted to points.
24 */
25 
26 // TerraLib
27 #include "MultiPoint.h"
28 
29 // STL
30 #include <cassert>
31 #include <ostream>
32 
33 const std::string te::gm::MultiPoint::sm_typeName("MultiPoint");
34 
35 te::gm::MultiPoint::MultiPoint(std::size_t nGeom, GeomType t, int srid, Envelope* mbr)
36  : GeometryCollection(nGeom, t, srid, mbr)
37 {
38  assert(t == MultiPointType || t == MultiPointZType || t == MultiPointMType || t == MultiPointZMType);
39 }
40 
42  : GeometryCollection(rhs)
43 {
44 }
45 
47 {
49 
50  return *this;
51 }
52 
54 {
55  return new MultiPoint(*this);
56 }
57 
59 {
60  return te::gm::P;
61 }
62 
63 const std::string& te::gm::MultiPoint::getGeometryType() const throw()
64 {
65  return sm_typeName;
66 }
67 
68 te::gm::Geometry* te::gm::MultiPoint::locateBetween(const double& /*mStart*/, const double& /*mEnd*/) const throw(Exception)
69 {
70  return 0;
71 }
72 
te::dt::AbstractData * clone() const
It clones the multi point.
Definition: MultiPoint.cpp:53
static const std::string sm_typeName
Geometry type name for MultiPoint.
Definition: MultiPoint.h:154
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
Definition: Enums.h:41
Geometry * locateBetween(const double &mStart, const double &mEnd) const
It returns a derived geometry collection value according to the range of coordinate values inclusivel...
Definition: MultiPoint.cpp:68
Dimensionality getDimension() const
MultiPoint is 0-dimensional.
Definition: MultiPoint.cpp:58
GeometryCollection & operator=(const GeometryCollection &rhs)
Assignment operator.
MultiPoint(std::size_t nGeom, GeomType t, int srid=0, Envelope *mbr=0)
It initializes the Geometry with the specified spatial reference system id and envelope.
Definition: MultiPoint.cpp:35
MultiPoint is a GeometryCollection whose elements are restricted to points.
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:142
A base class for values that can be retrieved from the data access module.
Definition: AbstractData.h:57
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:73
MultiPoint & operator=(const MultiPoint &rhs)
Assignment operator.
Definition: MultiPoint.cpp:46
const std::string & getGeometryType() const
The name of the instantiable subtype of geometry: MultiPoint.
Definition: MultiPoint.cpp:63
It is a collection of other geometric objects.