GEOS  3.7.0
MultiPolygon.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/MultiPolygon.java r320 (JTS-1.12)
18  *
19  **********************************************************************/
20 
21 #ifndef GEOS_GEOS_MULTIPOLYGON_H
22 #define GEOS_GEOS_MULTIPOLYGON_H
23 
24 #include <geos/export.h>
25 #include <string>
26 #include <vector>
27 #include <geos/platform.h>
28 #include <geos/geom/GeometryCollection.h> // for inheritance
29 #include <geos/geom/Polygonal.h> // for inheritance
30 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
31 
32 #include <geos/inline.h>
33 
34 // Forward declarations
35 namespace geos {
36  namespace geom { // geos::geom
37  class Coordinate;
38  class CoordinateArraySequence;
39  class MultiPoint;
40  }
41 }
42 
43 
44 namespace geos {
45 namespace geom { // geos::geom
46 
47 #ifdef _MSC_VER
48 #pragma warning(push)
49 #pragma warning(disable:4250) // T1 inherits T2 via dominance
50 #endif
51 
53 //
60 class GEOS_DLL MultiPolygon: public GeometryCollection, public Polygonal
61 {
62 public:
63 
64  friend class GeometryFactory;
65 
66  ~MultiPolygon() override;
67 
69  Dimension::DimensionType getDimension() const override;
70 
72  int getBoundaryDimension() const override;
73 
80  Geometry* getBoundary() const override;
81 
82  std::string getGeometryType() const override;
83 
84  GeometryTypeId getGeometryTypeId() const override;
85 
86  bool isSimple() const override;
87 
88  bool equalsExact(const Geometry *other, double tolerance=0) const override;
89 
90  Geometry *clone() const override;
91 
92  Geometry *reverse() const override;
93 
94 protected:
95 
117  MultiPolygon(std::vector<Geometry *> *newPolys, const GeometryFactory *newFactory);
118 
119  MultiPolygon(const MultiPolygon &mp);
120 };
121 
122 #ifdef _MSC_VER
123 #pragma warning(pop)
124 #endif
125 
126 } // namespace geos::geom
127 } // namespace geos
128 
129 #ifdef GEOS_INLINE
130 # include "geos/geom/MultiPolygon.inl"
131 #endif
132 
133 #endif // ndef GEOS_GEOS_MULTIPOLYGON_H
Models a collection of Polygons.
Definition: MultiPolygon.h:60
GeometryTypeId
Geometry types.
Definition: Geometry.h:75
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:177
Definition: Polygonal.h:37
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:56
DimensionType
Definition: Dimension.h:31