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

- File List

# RelateComputer.h

    00001 /**********************************************************************
    00002  * $Id: RelateComputer.h 2557 2009-06-08 09:30:55Z strk $
    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  * Last port: operation/relate/RelateComputer.java rev. 1.24 (JTS-1.10)
    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> // for RelateComputer composition
    00026 #include <geos/algorithm/LineIntersector.h> // for RelateComputer composition
    00027 #include <geos/geomgraph/NodeMap.h> // for RelateComputer composition
    00028 #include <geos/geom/Coordinate.h> // for RelateComputer composition
    00029
    00030 #include <vector>
    00031
    00032 // Forward declarations
    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 { // geos::operation
    00052 namespace relate { // geos::operation::relate
    00053
    00068 class GEOS_DLL RelateComputer {
    00069 public:
    00070         //RelateComputer();
    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 } // namespace geos:operation:relate
    00112 } // namespace geos:operation
    00113 } // namespace geos
    00114
    00115 #endif // GEOS_OP_RELATE_RELATECOMPUTER_H
    00116
    00117 /**********************************************************************
    00118  * $Log$
    00119  * Revision 1.1  2006/03/21 13:11:29  strk
    00120  * opRelate.h header split
    00121  *
    00122  **********************************************************************/
    00123