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

# RelateComputer.h

    00001 /**********************************************************************
    00002  * $Id: RelateComputer.h 1820 2006-09-06 16:54:23Z mloskot $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2006 Refractions Research Inc.
    00008  *
    00009  * This is free software; you can redistribute and/or modify it under
    00010  * the terms of the GNU Lesser General Public Licence as published
    00011  * by the Free Software Foundation.
    00012  * See the COPYING file for more information.
    00013  *
    00014  **********************************************************************/
    00015
    00016 #ifndef GEOS_OP_RELATE_RELATECOMPUTER_H
    00017 #define GEOS_OP_RELATE_RELATECOMPUTER_H
    00018
    00019 #include <geos/algorithm/PointLocator.h> // for RelateComputer composition
    00020 #include <geos/algorithm/LineIntersector.h> // for RelateComputer composition
    00021 #include <geos/geomgraph/NodeMap.h> // for RelateComputer composition
    00022 #include <geos/geom/Coordinate.h> // for RelateComputer composition
    00023
    00024 #include <vector>
    00025
    00026 // Forward declarations
    00027 namespace geos {
    00028         namespace geom {
    00029                 class IntersectionMatrix;
    00030                 class Geometry;
    00031         }
    00032         namespace geomgraph {
    00033                 class GeometryGraph;
    00034                 class Edge;
    00035                 class EdgeEnd;
    00036                 class Node;
    00037                 namespace index {
    00038                         class SegmentIntersector;
    00039                 }
    00040         }
    00041 }
    00042
    00043
    00044 namespace geos {
    00045 namespace operation { // geos::operation
    00046 namespace relate { // geos::operation::relate
    00047
    00062 class RelateComputer {
    00063 public:
    00064         //RelateComputer();
    00065         virtual ~RelateComputer();
    00066         RelateComputer(std::vector<geomgraph::GeometryGraph*> *newArg);
    00067         geom::IntersectionMatrix* computeIM();
    00068 private:
    00069
    00070         algorithm::LineIntersector li;
    00071
    00072         algorithm::PointLocator ptLocator;
    00073
    00075         std::vector<geomgraph::GeometryGraph*> *arg;
    00076
    00077         geomgraph::NodeMap nodes;
    00078
    00080         geom::IntersectionMatrix *im;
    00081
    00082         std::vector<geomgraph::Edge*> isolatedEdges;
    00083
    00085         geom::Coordinate invalidPoint;
    00086
    00087         void insertEdgeEnds(std::vector<geomgraph::EdgeEnd*> *ee);
    00088
    00089         void computeProperIntersectionIM(geomgraph::index::SegmentIntersector *intersector,
    00090                         geom::IntersectionMatrix *imX);
    00091
    00092         void copyNodesAndLabels(int argIndex);
    00093         void computeIntersectionNodes(int argIndex);
    00094         void labelIntersectionNodes(int argIndex);
    00095         void computeDisjointIM(geom::IntersectionMatrix *imX);
    00096         void labelNodeEdges();
    00097         void updateIM(geom::IntersectionMatrix *imX);
    00098         void labelIsolatedEdges(int thisIndex,int targetIndex);
    00099         void labelIsolatedEdge(geomgraph::Edge *e,int targetIndex, const geom::Geometry *target);
    00100         void labelIsolatedNodes();
    00101         void labelIsolatedNode(geomgraph::Node *n,int targetIndex);
    00102 };
    00103
    00104
    00105 } // namespace geos:operation:relate
    00106 } // namespace geos:operation
    00107 } // namespace geos
    00108
    00109 #endif // GEOS_OP_RELATE_RELATECOMPUTER_H
    00110
    00111 /**********************************************************************
    00112  * $Log$
    00113  * Revision 1.1  2006/03/21 13:11:29  strk
    00114  * opRelate.h header split
    00115  *
    00116  **********************************************************************/
    00117