00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GEOS_OP_RELATE_RELATECOMPUTER_H
00021 #define GEOS_OP_RELATE_RELATECOMPUTER_H
00022
00023 #include <geos/export.h>
00024
00025 #include <geos/algorithm/PointLocator.h>
00026 #include <geos/algorithm/LineIntersector.h>
00027 #include <geos/geomgraph/NodeMap.h>
00028 #include <geos/geom/Coordinate.h>
00029
00030 #include <vector>
00031
00032
00033 namespace geos {
00034 namespace geom {
00035 class IntersectionMatrix;
00036 class Geometry;
00037 }
00038 namespace geomgraph {
00039 class GeometryGraph;
00040 class Edge;
00041 class EdgeEnd;
00042 class Node;
00043 namespace index {
00044 class SegmentIntersector;
00045 }
00046 }
00047 }
00048
00049
00050 namespace geos {
00051 namespace operation {
00052 namespace relate {
00053
00068 class GEOS_DLL RelateComputer {
00069 public:
00070
00071 virtual ~RelateComputer();
00072 RelateComputer(std::vector<geomgraph::GeometryGraph*> *newArg);
00073 geom::IntersectionMatrix* computeIM();
00074 private:
00075
00076 algorithm::LineIntersector li;
00077
00078 algorithm::PointLocator ptLocator;
00079
00081 std::vector<geomgraph::GeometryGraph*> *arg;
00082
00083 geomgraph::NodeMap nodes;
00084
00086 geom::IntersectionMatrix *im;
00087
00088 std::vector<geomgraph::Edge*> isolatedEdges;
00089
00091 geom::Coordinate invalidPoint;
00092
00093 void insertEdgeEnds(std::vector<geomgraph::EdgeEnd*> *ee);
00094
00095 void computeProperIntersectionIM(geomgraph::index::SegmentIntersector *intersector,
00096 geom::IntersectionMatrix *imX);
00097
00098 void copyNodesAndLabels(int argIndex);
00099 void computeIntersectionNodes(int argIndex);
00100 void labelIntersectionNodes(int argIndex);
00101 void computeDisjointIM(geom::IntersectionMatrix *imX);
00102 void labelNodeEdges();
00103 void updateIM(geom::IntersectionMatrix *imX);
00104 void labelIsolatedEdges(int thisIndex,int targetIndex);
00105 void labelIsolatedEdge(geomgraph::Edge *e,int targetIndex, const geom::Geometry *target);
00106 void labelIsolatedNodes();
00107 void labelIsolatedNode(geomgraph::Node *n,int targetIndex);
00108 };
00109
00110
00111 }
00112 }
00113 }
00114
00115 #endif // GEOS_OP_RELATE_RELATECOMPUTER_H
00116
00117
00118
00119
00120
00121
00122
00123