GEOS
3.3.5
|
00001 /********************************************************************** 00002 * $Id: MultiPolygon.h 3211 2011-02-13 19:54:01Z mloskot $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 00007 * Copyright (C) 2011 Sandro Santilli <strk@keybit.net> 00008 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00009 * Copyright (C) 2005 2006 Refractions Research Inc. 00010 * 00011 * This is free software; you can redistribute and/or modify it under 00012 * the terms of the GNU Lesser General Public Licence as published 00013 * by the Free Software Foundation. 00014 * See the COPYING file for more information. 00015 * 00016 ********************************************************************** 00017 * 00018 * Last port: geom/MultiPolygon.java r320 (JTS-1.12) 00019 * 00020 **********************************************************************/ 00021 00022 #ifndef GEOS_GEOS_MULTIPOLYGON_H 00023 #define GEOS_GEOS_MULTIPOLYGON_H 00024 00025 #include <geos/export.h> 00026 #include <string> 00027 #include <vector> 00028 #include <geos/platform.h> 00029 #include <geos/geom/GeometryCollection.h> // for inheritance 00030 #include <geos/geom/Polygonal.h> // for inheritance 00031 #include <geos/geom/Dimension.h> // for Dimension::DimensionType 00032 00033 #include <geos/inline.h> 00034 00035 // Forward declarations 00036 namespace geos { 00037 namespace geom { // geos::geom 00038 class Coordinate; 00039 class CoordinateArraySequence; 00040 class MultiPoint; 00041 } 00042 } 00043 00044 00045 namespace geos { 00046 namespace geom { // geos::geom 00047 00048 #ifdef _MSC_VER 00049 #pragma warning(push) 00050 #pragma warning(disable:4250) // T1 inherits T2 via dominance 00051 #endif 00052 00054 // 00061 class GEOS_DLL MultiPolygon: public GeometryCollection, public Polygonal 00062 { 00063 public: 00064 00065 friend class GeometryFactory; 00066 00067 virtual ~MultiPolygon(); 00068 00070 Dimension::DimensionType getDimension() const; 00071 00073 int getBoundaryDimension() const; 00074 00081 Geometry* getBoundary() const; 00082 00083 std::string getGeometryType() const; 00084 00085 virtual GeometryTypeId getGeometryTypeId() const; 00086 00087 bool isSimple() const; 00088 00089 bool equalsExact(const Geometry *other, double tolerance=0) const; 00090 00091 Geometry *clone() const; 00092 00093 protected: 00094 00116 MultiPolygon(std::vector<Geometry *> *newPolys, const GeometryFactory *newFactory); 00117 00118 MultiPolygon(const MultiPolygon &mp); 00119 }; 00120 00121 #ifdef _MSC_VER 00122 #pragma warning(pop) 00123 #endif 00124 00125 } // namespace geos::geom 00126 } // namespace geos 00127 00128 #ifdef GEOS_INLINE 00129 # include "geos/geom/MultiPolygon.inl" 00130 #endif 00131 00132 #endif // ndef GEOS_GEOS_MULTIPOLYGON_H 00133 00134 /********************************************************************** 00135 * $Log$ 00136 * Revision 1.4 2006/05/04 15:49:39 strk 00137 * updated all Geometry::getDimension() methods to return Dimension::DimensionType (closes bug#93) 00138 * 00139 * Revision 1.3 2006/04/28 10:55:39 strk 00140 * Geometry constructors made protected, to ensure all constructions use GeometryFactory, 00141 * which has been made friend of all Geometry derivates. getNumPoints() changed to return 00142 * size_t. 00143 * 00144 * Revision 1.2 2006/03/24 09:52:41 strk 00145 * USE_INLINE => GEOS_INLINE 00146 * 00147 * Revision 1.1 2006/03/09 16:46:49 strk 00148 * geos::geom namespace definition, first pass at headers split 00149 * 00150 **********************************************************************/