GEOS: MultiPolygon.h Source File

GEOS 3.3.8

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

MultiPolygon.h
1 /**********************************************************************
2 * $Id: MultiPolygon.h 3211 2011-02-13 19:54:01Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2011 Sandro Santilli <strk@keybit.net>
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 * Copyright (C) 2005 2006 Refractions Research Inc.
10 *
11 * This is free software; you can redistribute and/or modify it under
12 * the terms of the GNU Lesser General Public Licence as published
13 * by the Free Software Foundation.
14 * See the COPYING file for more information.
15 *
16 **********************************************************************
17 *
18 * Last port: geom/MultiPolygon.java r320 (JTS-1.12)
19 *
20 **********************************************************************/
21
22 #ifndef GEOS_GEOS_MULTIPOLYGON_H
23 #define GEOS_GEOS_MULTIPOLYGON_H
24
25 #include <geos/export.h>
26 #include <string>
27 #include <vector>
28 #include <geos/platform.h>
29 #include <geos/geom/GeometryCollection.h> // for inheritance
30 #include <geos/geom/Polygonal.h> // for inheritance
31 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
32
33 #include <geos/inline.h>
34
35 // Forward declarations
36 namespace geos {
37 namespace geom { // geos::geom
38 class Coordinate;
39 class CoordinateArraySequence;
40 class MultiPoint;
41 }
42 }
43
44
45 namespace geos {
46 namespace geom { // geos::geom
47
48 #ifdef _MSC_VER
49 #pragma warning(push)
50 #pragma warning(disable:4250) // T1 inherits T2 via dominance
51 #endif
52
54 //
61 class GEOS_DLL MultiPolygon: public GeometryCollection, public Polygonal
62 {
63 public:
64
65 friend class GeometryFactory;
66
67 virtual ~MultiPolygon();
68
70 Dimension::DimensionType getDimension() const;
71
73 int getBoundaryDimension() const;
74
81 Geometry* getBoundary() const;
82
83 std::string getGeometryType() const;
84
85 virtual GeometryTypeId getGeometryTypeId() const;
86
87 bool isSimple() const;
88
89 bool equalsExact(const Geometry *other, double tolerance=0) const;
90
91 Geometry *clone() const;
92
93 protected:
94
116 MultiPolygon(std::vector<Geometry *> *newPolys, const GeometryFactory *newFactory);
117
118 MultiPolygon(const MultiPolygon &mp);
119 };
120
121 #ifdef _MSC_VER
122 #pragma warning(pop)
123 #endif
124
125 } // namespace geos::geom
126 } // namespace geos
127
128 #ifdef GEOS_INLINE
129 # include "geos/geom/MultiPolygon.inl"
130 #endif
131
132 #endif // ndef GEOS_GEOS_MULTIPOLYGON_H
133
134 /**********************************************************************
135 * $Log$
136 * Revision 1.4 2006/05/04 15:49:39 strk
137 * updated all Geometry::getDimension() methods to return Dimension::DimensionType (closes bug#93)
138 *
139 * Revision 1.3 2006/04/28 10:55:39 strk
140 * Geometry constructors made protected, to ensure all constructions use GeometryFactory,
141 * which has been made friend of all Geometry derivates. getNumPoints() changed to return
142 * size_t.
143 *
144 * Revision 1.2 2006/03/24 09:52:41 strk
145 * USE_INLINE => GEOS_INLINE
146 *
147 * Revision 1.1 2006/03/09 16:46:49 strk
148 * geos::geom namespace definition, first pass at headers split
149 *
150 **********************************************************************/