GEOS  3.13.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 #pragma once
21 
22 #include <geos/export.h>
23 
24 #include <geos/geom/Coordinate.h> // for composition
25 
26 // Forward declarations
27 namespace geos {
28 namespace geom {
29 //class Coordinate;
30 class CoordinateSequence;
31 class Geometry;
32 class Polygon;
33 class MultiPolygon;
34 class MultiLineString;
35 class GeometryCollection;
36 }
37 }
38 
39 namespace geos {
40 namespace operation { // geos::operation
41 namespace valid { // geos::operation::valid
42 
48 class GEOS_DLL RepeatedPointTester {
49 public:
51  geom::CoordinateXY& getCoordinate();
52  bool hasRepeatedPoint(const geom::Geometry* g);
53  bool hasRepeatedPoint(const geom::CoordinateSequence* coord);
54 private:
55  geom::CoordinateXY repeatedCoord;
56  bool hasRepeatedPoint(const geom::Polygon* p);
57  bool hasRepeatedPoint(const geom::GeometryCollection* gc);
58  bool hasRepeatedPoint(const geom::MultiPolygon* gc);
59  bool hasRepeatedPoint(const geom::MultiLineString* gc);
60 };
61 
62 
63 } // namespace geos.operation.valid
64 } // namespace geos.operation
65 } // namespace geos
66 
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:51
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Models a collection of LineStrings.
Definition: MultiLineString.h:49
Definition: MultiPolygon.h:58
Represents a linear polygon, which may include holes.
Definition: Polygon.h:60
Implements the appropriate checks for repeated points (consecutive identical coordinates) as defined ...
Definition: RepeatedPointTester.h:48
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25