GEOS: LinearRing.h Source File

GEOS 3.3.8

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

- File List

LinearRing.h
1 /**********************************************************************
2 * $Id: LinearRing.h 3241 2011-02-23 15:45:40Z strk $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
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/LinearRing.java r320 (JTS-1.12)
18 *
19 **********************************************************************/
20
21 #ifndef GEOS_GEOS_LINEARRING_H
22 #define GEOS_GEOS_LINEARRING_H
23
24 #include <geos/export.h>
25 #include <string>
26 #include <vector>
27 #include <geos/platform.h>
28 #include <geos/geom/LineString.h>
29
30 #include <geos/inline.h>
31
32 // Forward declarations
33 namespace geos {
34 namespace geom { // geos::geom
35 class Coordinate;
36 class CoordinateArraySequence;
37 }
38 }
39
40 namespace geos {
41 namespace geom { // geos::geom
42
58 class GEOS_DLL LinearRing : public LineString {
59
60 public:
61
66 static const unsigned int MINIMUM_VALID_SIZE = 4;
67
68 LinearRing(const LinearRing &lr);
69
82 LinearRing(CoordinateSequence* points,
83 const GeometryFactory *newFactory);
84
86 LinearRing(CoordinateSequence::AutoPtr points,
87 const GeometryFactory *newFactory);
88
89 virtual Geometry *clone() const { return new LinearRing(*this); }
90
91 virtual ~LinearRing();
92
99 int getBoundaryDimension() const;
100
109 bool isSimple() const;
110
111 bool isClosed() const;
112
113 std::string getGeometryType() const;
114
115 virtual GeometryTypeId getGeometryTypeId() const;
116
117 void setPoints(CoordinateSequence* cl);
118
119 Geometry* reverse() const;
120
121 private:
122
123 void validateConstruction();
124 };
125
126
127 } // namespace geos::geom
128 } // namespace geos
129
130 //#ifdef GEOS_INLINE
131 //# include "geos/geom/LinearRing.inl"
132 //#endif
133
134 #endif // ndef GEOS_GEOS_LINEARRING_H
135
136 /**********************************************************************
137 * $Log$
138 * Revision 1.4 2006/04/11 11:16:25 strk
139 * Added LineString and LinearRing constructors by auto_ptr
140 *
141 * Revision 1.3 2006/04/10 17:35:44 strk
142 * Changed LineString::points and Point::coordinates to be wrapped
143 * in an auto_ptr<>. This should close bugs #86 and #89
144 *
145 * Revision 1.2 2006/03/24 09:52:41 strk
146 * USE_INLINE => GEOS_INLINE
147 *
148 * Revision 1.1 2006/03/09 16:46:49 strk
149 * geos::geom namespace definition, first pass at headers split
150 *
151 **********************************************************************/