GEOS 3.4.2

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

- File List

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:
51 RepeatedPointTester() {}
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