GEOS  3.8.0dev
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/geom/GeometryCollection.h> // for inheritance
28 #include <geos/geom/Polygonal.h> // for inheritance
29 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
30 
31 #include <geos/inline.h>
32 
33 // Forward declarations
34 namespace geos {
35 namespace geom { // geos::geom
36 class Coordinate;
37 class CoordinateArraySequence;
38 class MultiPoint;
39 }
40 }
41 
42 
43 namespace geos {
44 namespace geom { // geos::geom
45 
46 #ifdef _MSC_VER
47 #pragma warning(push)
48 #pragma warning(disable:4250) // T1 inherits T2 via dominance
49 #endif
50 
52 //
59 class GEOS_DLL MultiPolygon: public GeometryCollection, public Polygonal {
60 public:
61 
62  friend class GeometryFactory;
63 
64  ~MultiPolygon() override;
65 
67  Dimension::DimensionType getDimension() const override;
68 
70  int getBoundaryDimension() const override;
71 
78  Geometry* getBoundary() const override;
79 
80  std::string getGeometryType() const override;
81 
82  GeometryTypeId getGeometryTypeId() const override;
83 
84  bool equalsExact(const Geometry* other, double tolerance = 0) const override;
85 
86  Geometry* clone() const override;
87 
88  Geometry* reverse() const override;
89 
90 protected:
91 
113  MultiPolygon(std::vector<Geometry*>* newPolys, const GeometryFactory* newFactory);
114 
115  MultiPolygon(const MultiPolygon& mp);
116 
117  int
118  getSortIndex() const override
119  {
120  return SORTINDEX_MULTIPOLYGON;
121  };
122 
123 };
124 
125 #ifdef _MSC_VER
126 #pragma warning(pop)
127 #endif
128 
129 } // namespace geos::geom
130 } // namespace geos
131 
132 #ifdef GEOS_INLINE
133 # include "geos/geom/MultiPolygon.inl"
134 #endif
135 
136 #endif // ndef GEOS_GEOS_MULTIPOLYGON_H
Models a collection of Polygons.
Definition: MultiPolygon.h:59
GeometryTypeId
Geometry types.
Definition: Geometry.h:74
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:187
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:55
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
DimensionType
Definition: Dimension.h:31