GEOS  3.8.0dev
MultiPoint.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2011 Sandro Santilli <strk@kbt.io>
7  * Copyright (C) 2001-2002 Vivid Solutions Inc.
8  * Copyright (C) 2005 2006 Refractions Research Inc.
9  *
10  * This is free software; you can redistribute and/or modify it under
11  * the terms of the GNU Lesser General Public Licence as published
12  * by the Free Software Foundation.
13  * See the COPYING file for more information.
14  *
15  **********************************************************************
16  *
17  * Last port: geom/MultiPoint.java r320 (JTS-1.12)
18  *
19  **********************************************************************/
20 
21 #ifndef GEOS_GEOS_MULTIPOINT_H
22 #define GEOS_GEOS_MULTIPOINT_H
23 
24 #include <geos/export.h>
25 #include <geos/geom/GeometryCollection.h> // for inheritance
26 #include <geos/geom/Puntal.h> // for inheritance
27 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
28 
29 #include <geos/inline.h>
30 
31 #include <string>
32 #include <vector>
33 
34 namespace geos {
35 namespace geom { // geos::geom
36 class Coordinate;
37 class CoordinateArraySequence;
38 }
39 }
40 
41 namespace geos {
42 namespace geom { // geos::geom
43 
44 #ifdef _MSC_VER
45 #pragma warning(push)
46 #pragma warning(disable:4250) // T1 inherits T2 via dominance
47 #endif
48 
54 class GEOS_DLL MultiPoint: public GeometryCollection, public Puntal {
55 
56 public:
57 
58  friend class GeometryFactory;
59 
60  ~MultiPoint() override;
61 
63  Dimension::DimensionType getDimension() const override;
64 
66  int getBoundaryDimension() const override;
67 
77  Geometry* getBoundary() const override;
78 
79  std::string getGeometryType() const override;
80 
81  GeometryTypeId getGeometryTypeId() const override;
82 
83  bool equalsExact(const Geometry* other, double tolerance = 0) const override;
84 
85  Geometry*
86  clone() const override
87  {
88  return new MultiPoint(*this);
89  }
90 
91  Geometry*
92  reverse() const override
93  {
94  return clone();
95  }
96 
97 protected:
98 
117  MultiPoint(std::vector<Geometry*>* newPoints, const GeometryFactory* newFactory);
118 
119  MultiPoint(const MultiPoint& mp): Geometry(mp), GeometryCollection(mp) {}
120 
121  const Coordinate* getCoordinateN(size_t n) const;
122 
123  int
124  getSortIndex() const override
125  {
126  return SORTINDEX_MULTIPOINT;
127  };
128 
129 };
130 
131 #ifdef _MSC_VER
132 #pragma warning(pop)
133 #endif
134 
135 } // namespace geos::geom
136 } // namespace geos
137 
138 #endif // ndef GEOS_GEOS_MULTIPOINT_H
Definition: Puntal.h:37
GeometryTypeId
Geometry types.
Definition: Geometry.h:74
Geometry * reverse() const override
Definition: MultiPoint.h:92
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:187
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:67
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:55
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
Definition: MultiPoint.h:54
Geometry * clone() const override
Definition: MultiPoint.h:86
DimensionType
Definition: Dimension.h:31