GEOS 3.2.1
|
00001 /********************************************************************** 00002 * $Id: LinearRing.h 2556 2009-06-06 22:22:28Z 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 rev. 1.32 (JTS-1.10) 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 00062 LinearRing(const LinearRing &lr); 00063 00076 LinearRing(CoordinateSequence* points, 00077 const GeometryFactory *newFactory); 00078 00080 LinearRing(CoordinateSequence::AutoPtr points, 00081 const GeometryFactory *newFactory); 00082 00083 virtual Geometry *clone() const { return new LinearRing(*this); } 00084 00085 virtual ~LinearRing(); 00086 00093 int getBoundaryDimension() const; 00094 00103 bool isSimple() const; 00104 00105 std::string getGeometryType() const; 00106 00107 virtual GeometryTypeId getGeometryTypeId() const; 00108 00109 void setPoints(CoordinateSequence* cl); 00110 00111 Geometry* reverse() const; 00112 00113 private: 00114 00115 void validateConstruction(); 00116 }; 00117 00118 00119 } // namespace geos::geom 00120 } // namespace geos 00121 00122 //#ifdef GEOS_INLINE 00123 //# include "geos/geom/LinearRing.inl" 00124 //#endif 00125 00126 #endif // ndef GEOS_GEOS_LINEARRING_H 00127 00128 /********************************************************************** 00129 * $Log$ 00130 * Revision 1.4 2006/04/11 11:16:25 strk 00131 * Added LineString and LinearRing constructors by auto_ptr 00132 * 00133 * Revision 1.3 2006/04/10 17:35:44 strk 00134 * Changed LineString::points and Point::coordinates to be wrapped 00135 * in an auto_ptr<>. This should close bugs #86 and #89 00136 * 00137 * Revision 1.2 2006/03/24 09:52:41 strk 00138 * USE_INLINE => GEOS_INLINE 00139 * 00140 * Revision 1.1 2006/03/09 16:46:49 strk 00141 * geos::geom namespace definition, first pass at headers split 00142 * 00143 **********************************************************************/