GEOS 3.6.2
RelateComputer.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
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
40namespace geos {
41 namespace geom {
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
57namespace geos {
58namespace operation { // geos::operation
59namespace relate { // geos::operation::relate
60
75class GEOS_DLL RelateComputer {
76public:
77 RelateComputer(std::vector<geomgraph::GeometryGraph*> *newArg);
78 ~RelateComputer();
79
80 geom::IntersectionMatrix* computeIM();
81private:
82
84
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,
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
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition LineIntersector.h:49
Computes the topological relationship (Location) of a single point to a Geometry.
Definition PointLocator.h:58
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:167
Implementation of Dimensionally Extended Nine-Intersection Model (DE-9IM) matrix.
Definition IntersectionMatrix.h:51
Models the end of an edge incident on a node.
Definition EdgeEnd.h:56
Definition geomgraph/Edge.h:66
Definition GeometryGraph.h:74
Definition geomgraph/Node.h:62
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Contains classes that implement topology graphs.
Definition IndexedNestedRingTester.h:34
Contains classes to implement the computation of the spatial relationships of Geometrys.
Definition EdgeEndBuilder.h:42
Provides classes for implementing operations on geometries.
Definition IndexedNestedRingTester.h:40
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25