GEOS  3.8.0dev
RepeatedPointTester.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2005-2006 Refractions Research Inc.
7  * Copyright (C) 2001-2002 Vivid Solutions 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: operation/valid/RepeatedPointTester.java rev. 1.8 (JTS-1.10)
17  *
18  **********************************************************************/
19
20 #ifndef GEOS_OP_REPEATEDPOINTTESTER_H
21 #define GEOS_OP_REPEATEDPOINTTESTER_H
22
23 #include <geos/export.h>
24
25 #include <geos/geom/Coordinate.h> // for composition
26
27 // Forward declarations
28 namespace geos {
29 namespace geom {
30 //class Coordinate;
31 class CoordinateSequence;
32 class Geometry;
33 class Polygon;
34 class MultiPolygon;
35 class MultiLineString;
36 class GeometryCollection;
37 }
38 }
39
40 namespace geos {
41 namespace operation { // geos::operation
42 namespace valid { // geos::operation::valid
43
49 class GEOS_DLL RepeatedPointTester {
50 public:
52  geom::Coordinate& getCoordinate();
53  bool hasRepeatedPoint(const geom::Geometry* g);
54  bool hasRepeatedPoint(const geom::CoordinateSequence* coord);
55 private:
56  geom::Coordinate repeatedCoord;
57  bool hasRepeatedPoint(const geom::Polygon* p);
58  bool hasRepeatedPoint(const geom::GeometryCollection* gc);
59  bool hasRepeatedPoint(const geom::MultiPolygon* gc);
60  bool hasRepeatedPoint(const geom::MultiLineString* gc);
61 };
62
63
64 } // namespace geos.operation.valid
65 } // namespace geos.operation
66 } // namespace geos
67
68 #endif // GEOS_OP_REPEATEDPOINTTESTER_H
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Models a collection of Polygons.
Definition: MultiPolygon.h:59
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Implements the appropriate checks for repeated points (consecutive identical coordinates) as defined ...
Definition: RepeatedPointTester.h:49
Represents a linear polygon, which may include holes.
Definition: Polygon.h:64
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:55
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:58
Models a collection of LineStrings.
Definition: MultiLineString.h:51