GEOS
3.3.9
|
00001 /********************************************************************** 00002 * $Id: LinearRing.h 3241 2011-02-23 15:45:40Z strk $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 00007 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00008 * Copyright (C) 2005 2006 Refractions Research Inc. 00009 * 00010 * This is free software; you can redistribute and/or modify it under 00011 * the terms of the GNU Lesser General Public Licence as published 00012 * by the Free Software Foundation. 00013 * See the COPYING file for more information. 00014 * 00015 ********************************************************************** 00016 * 00017 * Last port: geom/LinearRing.java r320 (JTS-1.12) 00018 * 00019 **********************************************************************/ 00020 00021 #ifndef GEOS_GEOS_LINEARRING_H 00022 #define GEOS_GEOS_LINEARRING_H 00023 00024 #include <geos/export.h> 00025 #include <string> 00026 #include <vector> 00027 #include <geos/platform.h> 00028 #include <geos/geom/LineString.h> 00029 00030 #include <geos/inline.h> 00031 00032 // Forward declarations 00033 namespace geos { 00034 namespace geom { // geos::geom 00035 class Coordinate; 00036 class CoordinateArraySequence; 00037 } 00038 } 00039 00040 namespace geos { 00041 namespace geom { // geos::geom 00042 00058 class GEOS_DLL LinearRing : public LineString { 00059 00060 public: 00061 00066 static const unsigned int MINIMUM_VALID_SIZE = 4; 00067 00068 LinearRing(const LinearRing &lr); 00069 00082 LinearRing(CoordinateSequence* points, 00083 const GeometryFactory *newFactory); 00084 00086 LinearRing(CoordinateSequence::AutoPtr points, 00087 const GeometryFactory *newFactory); 00088 00089 virtual Geometry *clone() const { return new LinearRing(*this); } 00090 00091 virtual ~LinearRing(); 00092 00099 int getBoundaryDimension() const; 00100 00109 bool isSimple() const; 00110 00111 bool isClosed() const; 00112 00113 std::string getGeometryType() const; 00114 00115 virtual GeometryTypeId getGeometryTypeId() const; 00116 00117 void setPoints(CoordinateSequence* cl); 00118 00119 Geometry* reverse() const; 00120 00121 private: 00122 00123 void validateConstruction(); 00124 }; 00125 00126 00127 } // namespace geos::geom 00128 } // namespace geos 00129 00130 //#ifdef GEOS_INLINE 00131 //# include "geos/geom/LinearRing.inl" 00132 //#endif 00133 00134 #endif // ndef GEOS_GEOS_LINEARRING_H 00135 00136 /********************************************************************** 00137 * $Log$ 00138 * Revision 1.4 2006/04/11 11:16:25 strk 00139 * Added LineString and LinearRing constructors by auto_ptr 00140 * 00141 * Revision 1.3 2006/04/10 17:35:44 strk 00142 * Changed LineString::points and Point::coordinates to be wrapped 00143 * in an auto_ptr<>. This should close bugs #86 and #89 00144 * 00145 * Revision 1.2 2006/03/24 09:52:41 strk 00146 * USE_INLINE => GEOS_INLINE 00147 * 00148 * Revision 1.1 2006/03/09 16:46:49 strk 00149 * geos::geom namespace definition, first pass at headers split 00150 * 00151 **********************************************************************/