GEOS  3.6.1
MultiPolygon.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2011 Sandro Santilli <strk@keybit.net>
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  virtual ~MultiPolygon();
67 
69  Dimension::DimensionType getDimension() const;
70 
72  int getBoundaryDimension() const;
73 
80  Geometry* getBoundary() const;
81 
82  std::string getGeometryType() const;
83 
84  virtual GeometryTypeId getGeometryTypeId() const;
85 
86  bool isSimple() const;
87 
88  bool equalsExact(const Geometry *other, double tolerance=0) const;
89 
90  Geometry *clone() const;
91 
92 protected:
93 
115  MultiPolygon(std::vector<Geometry *> *newPolys, const GeometryFactory *newFactory);
116 
117  MultiPolygon(const MultiPolygon &mp);
118 };
119 
120 #ifdef _MSC_VER
121 #pragma warning(pop)
122 #endif
123 
124 } // namespace geos::geom
125 } // namespace geos
126 
127 #ifdef GEOS_INLINE
128 # include "geos/geom/MultiPolygon.inl"
129 #endif
130 
131 #endif // ndef GEOS_GEOS_MULTIPOLYGON_H
Models a collection of Polygons.
Definition: MultiPolygon.h:60
GeometryTypeId
Geometry types.
Definition: Geometry.h:65
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:167
Definition: Polygonal.h:32
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
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
DimensionType
Definition: Dimension.h:31