GEOS 3.3.8

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

- File List

NodingValidator.h
1 /**********************************************************************
2 * $Id: NodingValidator.h 2778 2009-12-03 19:44:00Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 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 #ifndef GEOS_NODING_NODINGVALIDATOR_H
17 #define GEOS_NODING_NODINGVALIDATOR_H
18
19 #include <geos/export.h>
20
21 #include <vector>
22 #include <iostream>
23
24 #include <geos/inline.h>
25
26 #include <geos/algorithm/LineIntersector.h>
27 //#include <geos/geom/Coordinate.h>
28
29 // Forward declarations
30 namespace geos {
31 namespace geom {
32 class Coordinate;
33 }
34 namespace noding {
35 class SegmentString;
36 }
37 }
38
39 namespace geos {
40 namespace noding { // geos.noding
41
49 class GEOS_DLL NodingValidator {
50 private:
51 algorithm::LineIntersector li;
52 const std::vector<SegmentString*>& segStrings;
53
58 void checkCollapses() const;
59
60 void checkCollapses(const SegmentString& ss) const;
61
62 void checkCollapse(const geom::Coordinate& p0, const geom::Coordinate& p1,
63 const geom::Coordinate& p2) const;
64
69 void checkInteriorIntersections();
70
71 void checkInteriorIntersections(const SegmentString& ss0,
72 const SegmentString& ss1);
73
74 void checkInteriorIntersections(
75 const SegmentString& e0, unsigned int segIndex0,
76 const SegmentString& e1, unsigned int segIndex1);
77
82 void checkEndPtVertexIntersections() const;
83
84 void checkEndPtVertexIntersections(const geom::Coordinate& testPt,
85 const std::vector<SegmentString*>& segStrings) const;
86
91 bool hasInteriorIntersection(const algorithm::LineIntersector& aLi,
92 const geom::Coordinate& p0, const geom::Coordinate& p1) const;
93
94 // Declare type as noncopyable
95 NodingValidator(const NodingValidator& other);
96 NodingValidator& operator=(const NodingValidator& rhs);
97
98 public:
99
100 NodingValidator(const std::vector<SegmentString*>& newSegStrings):
101 segStrings(newSegStrings)
102 {}
103
104 ~NodingValidator() {}
105
106 void checkValid();
107
108 };
109
110
111 } // namespace geos.noding
112 } // namespace geos
113
114 //#ifdef GEOS_INLINE
115 //# include "geos/noding/NodingValidator.inl"
116 //#endif
117
118 #endif // GEOS_NODING_NODINGVALIDATOR_H
119
120 /**********************************************************************
121 * $Log$
122 * Revision 1.2 2006/03/24 09:52:41 strk
123 * USE_INLINE => GEOS_INLINE
124 *
125 * Revision 1.1 2006/03/09 16:46:49 strk
126 * geos::geom namespace definition, first pass at headers split
127 *
128 **********************************************************************/
129