GEOS 3.6.2
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
35namespace geos {
36 namespace geom { // geos::geom
37 class Coordinate;
39 class MultiPoint;
40 }
41}
42
43
44namespace geos {
45namespace 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//
60class GEOS_DLL MultiPolygon: public GeometryCollection, public Polygonal
61{
62public:
63
64 friend class GeometryFactory;
65
66 virtual ~MultiPolygon();
67
70
73
81
82 std::string getGeometryType() const;
83
85
86 bool isSimple() const;
87
88 bool equalsExact(const Geometry *other, double tolerance=0) const;
89
90 Geometry *clone() const;
91
92protected:
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
The default implementation of CoordinateSequence.
Definition CoordinateArraySequence.h:37
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
DimensionType
Definition Dimension.h:31
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:167
Definition MultiPoint.h:56
std::string getGeometryType() const
Return a string representation of this Geometry type.
MultiPolygon(std::vector< Geometry * > *newPolys, const GeometryFactory *newFactory)
Construct a MultiPolygon.
Geometry * getBoundary() const
Computes the boundary of this geometry.
bool equalsExact(const Geometry *other, double tolerance=0) const
Returns true if the two Geometrys are exactly equal, up to a specified tolerance.
Dimension::DimensionType getDimension() const
Returns surface dimension (2).
virtual GeometryTypeId getGeometryTypeId() const
Return an integer representation of this Geometry type.
bool isSimple() const
Returns false if the Geometry not simple.
int getBoundaryDimension() const
Returns 1 (MultiPolygon boundary is MultiLineString).
Geometry * clone() const
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
GeometryTypeId
Geometry types.
Definition Geometry.h:65
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25