GEOS  3.7.2
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/platform.h>
26 #include <geos/geom/GeometryCollection.h> // for inheritance
27 #include <geos/geom/Puntal.h> // for inheritance
28 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
29 
30 #include <geos/inline.h>
31 
32 #include <string>
33 #include <vector>
34 
35 namespace geos {
36  namespace geom { // geos::geom
37  class Coordinate;
38  class CoordinateArraySequence;
39  }
40 }
41 
42 namespace geos {
43 namespace geom { // geos::geom
44 
45 #ifdef _MSC_VER
46 #pragma warning(push)
47 #pragma warning(disable:4250) // T1 inherits T2 via dominance
48 #endif
49 
55 class GEOS_DLL MultiPoint: public GeometryCollection, public Puntal
56 {
57 
58 public:
59 
60  friend class GeometryFactory;
61 
62  ~MultiPoint() override;
63 
65  Dimension::DimensionType getDimension() const override;
66 
68  int getBoundaryDimension() const override;
69 
79  Geometry* getBoundary() const override;
80 
81  std::string getGeometryType() const override;
82 
83  GeometryTypeId getGeometryTypeId() const override;
84 
85  bool equalsExact(const Geometry *other, double tolerance=0) const override;
86 
87  Geometry *clone() const override { return new MultiPoint(*this); }
88 
89  Geometry* reverse() const override { return clone(); }
90 
91 protected:
92 
111  MultiPoint(std::vector<Geometry *> *newPoints, const GeometryFactory *newFactory);
112 
113  MultiPoint(const MultiPoint &mp): Geometry(mp), GeometryCollection(mp) {}
114 
115  const Coordinate* getCoordinateN(int n) const;
116 };
117 
118 #ifdef _MSC_VER
119 #pragma warning(pop)
120 #endif
121 
122 } // namespace geos::geom
123 } // namespace geos
124 
125 #endif // ndef GEOS_GEOS_MULTIPOINT_H
geos::geom::MultiPoint
Definition: MultiPoint.h:55
geos::geom::MultiPoint::reverse
Geometry * reverse() const override
Definition: MultiPoint.h:89
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
geos::geom::Dimension::DimensionType
DimensionType
Definition: Dimension.h:67
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:177
geos::geom::GeometryCollection
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:56
geos::geom::GeometryTypeId
GeometryTypeId
Geometry types.
Definition: Geometry.h:75
geos::geom::MultiPoint::clone
Geometry * clone() const override
Definition: MultiPoint.h:87
geos::geom::GeometryFactory
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:67
geos::geom::Puntal
Definition: Puntal.h:69