GEOS 3.6.2
LinearRing.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2001-2002 Vivid Solutions Inc.
7 * Copyright (C) 2005 2006 Refractions Research Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************
15 *
16 * Last port: geom/LinearRing.java r320 (JTS-1.12)
17 *
18 **********************************************************************/
19
20#ifndef GEOS_GEOS_LINEARRING_H
21#define GEOS_GEOS_LINEARRING_H
22
23#include <geos/export.h>
24#include <string>
25#include <vector>
26#include <geos/platform.h>
27#include <geos/geom/LineString.h>
28
29#include <geos/inline.h>
30
31// Forward declarations
32namespace geos {
33 namespace geom { // geos::geom
34 class Coordinate;
36 }
37}
38
39namespace geos {
40namespace geom { // geos::geom
41
57class GEOS_DLL LinearRing : public LineString {
58
59public:
60
65 static const unsigned int MINIMUM_VALID_SIZE = 4;
66
67 LinearRing(const LinearRing &lr);
68
82 const GeometryFactory *newFactory);
83
85 LinearRing(CoordinateSequence::AutoPtr points,
86 const GeometryFactory *newFactory);
87
88 virtual Geometry *clone() const { return new LinearRing(*this); }
89
90 virtual ~LinearRing();
91
99
108 bool isSimple() const;
109
110 bool isClosed() const;
111
112 std::string getGeometryType() const;
113
115
116 void setPoints(CoordinateSequence* cl);
117
118 Geometry* reverse() const;
119
120private:
121
122 void validateConstruction();
123};
124
125
126} // namespace geos::geom
127} // namespace geos
128
129#endif // ndef GEOS_GEOS_LINEARRING_H
The default implementation of CoordinateSequence.
Definition CoordinateArraySequence.h:37
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:59
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:167
Models an OGC SFS LinearRing.
Definition LinearRing.h:57
virtual GeometryTypeId getGeometryTypeId() const
Return an integer representation of this Geometry type.
std::string getGeometryType() const
Return a string representation of this Geometry type.
bool isSimple() const
Returns true, since by definition LinearRings are always simple.
LinearRing(CoordinateSequence::AutoPtr points, const GeometryFactory *newFactory)
Hopefully cleaner version of the above.
int getBoundaryDimension() const
Returns Dimension.FALSE, since by definition LinearRings do not have a boundary.
virtual Geometry * clone() const
Creates and returns a full copy of this LineString object (including all coordinates contained by it)...
Definition LinearRing.h:88
static const unsigned int MINIMUM_VALID_SIZE
Definition LinearRing.h:65
LinearRing(CoordinateSequence *points, const GeometryFactory *newFactory)
Constructs a LinearRing with the given points.
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