GEOS: RelateComputer.h Source File

GEOS 3.3.8

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

- File List

RelateComputer.h
1 /**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.refractions.net
5 *
6 * Copyright (C) 2011 Sandro Santilli <strk@keybit.net>
7 * Copyright (C) 2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: operation/relate/RelateComputer.java rev. 1.24 (JTS-1.10)
18 *
19 **********************************************************************/
20
21 #ifndef GEOS_OP_RELATE_RELATECOMPUTER_H
22 #define GEOS_OP_RELATE_RELATECOMPUTER_H
23
24 #include <geos/export.h>
25
26 #include <geos/algorithm/PointLocator.h> // for RelateComputer composition
27 #include <geos/algorithm/LineIntersector.h> // for RelateComputer composition
28 #include <geos/geomgraph/NodeMap.h> // for RelateComputer composition
29 #include <geos/geom/Coordinate.h> // for RelateComputer composition
30
31 #include <vector>
32 #include <memory>
33
34 #ifdef _MSC_VER
35 #pragma warning(push)
36 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
37 #endif
38
39 // Forward declarations
40 namespace geos {
41 namespace geom {
42 class IntersectionMatrix;
43 class Geometry;
44 }
45 namespace geomgraph {
46 class GeometryGraph;
47 class Edge;
48 class EdgeEnd;
49 class Node;
50 namespace index {
51 class SegmentIntersector;
52 }
53 }
54 }
55
56
57 namespace geos {
58 namespace operation { // geos::operation
59 namespace relate { // geos::operation::relate
60
75 class GEOS_DLL RelateComputer {
76 public:
77 RelateComputer(std::vector<geomgraph::GeometryGraph*> *newArg);
78 ~RelateComputer();
79
80 geom::IntersectionMatrix* computeIM();
81 private:
82
83 algorithm::LineIntersector li;
84
85 algorithm::PointLocator ptLocator;
86
88 std::vector<geomgraph::GeometryGraph*> *arg;
89
90 geomgraph::NodeMap nodes;
91
93 std::auto_ptr<geom::IntersectionMatrix> im;
94
95 std::vector<geomgraph::Edge*> isolatedEdges;
96
98 geom::Coordinate invalidPoint;
99
100 void insertEdgeEnds(std::vector<geomgraph::EdgeEnd*> *ee);
101
102 void computeProperIntersectionIM(
103 geomgraph::index::SegmentIntersector *intersector,
104 geom::IntersectionMatrix *imX);
105
106 void copyNodesAndLabels(int argIndex);
107 void computeIntersectionNodes(int argIndex);
108 void labelIntersectionNodes(int argIndex);
109
114 void computeDisjointIM(geom::IntersectionMatrix *imX);
115
116 void labelNodeEdges();
117
121 void updateIM(geom::IntersectionMatrix *imX);
122
131 void labelIsolatedEdges(int thisIndex,int targetIndex);
132
140 void labelIsolatedEdge(geomgraph::Edge *e,int targetIndex,
141 const geom::Geometry *target);
142
152 void labelIsolatedNodes();
153
157 void labelIsolatedNode(geomgraph::Node *n,int targetIndex);
158 };
159
160
161 } // namespace geos:operation:relate
162 } // namespace geos:operation
163 } // namespace geos
164
165 #ifdef _MSC_VER
166 #pragma warning(pop)
167 #endif
168
169 #endif // GEOS_OP_RELATE_RELATECOMPUTER_H
170
171 /**********************************************************************
172 * $Log$
173 * Revision 1.1 2006/03/21 13:11:29 strk
174 * opRelate.h header split
175 *
176 **********************************************************************/
177