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

- File List

# RelateComputer.h

    00001 /**********************************************************************
    00002  *
    00003  * GEOS - Geometry Engine Open Source
    00004  * http://geos.refractions.net
    00005  *
    00006  * Copyright (C) 2011 Sandro Santilli <strk@keybit.net>
    00007  * Copyright (C) 2006 Refractions Research Inc.
    00008  * Copyright (C) 2001-2002 Vivid Solutions Inc.
    00009  *
    00010  * This is free software; you can redistribute and/or modify it under
    00011  * the terms of the GNU Lesser General Public Licence as published
    00012  * by the Free Software Foundation.
    00013  * See the COPYING file for more information.
    00014  *
    00015  **********************************************************************
    00016  *
    00017  * Last port: operation/relate/RelateComputer.java rev. 1.24 (JTS-1.10)
    00018  *
    00019  **********************************************************************/
    00020
    00021 #ifndef GEOS_OP_RELATE_RELATECOMPUTER_H
    00022 #define GEOS_OP_RELATE_RELATECOMPUTER_H
    00023
    00024 #include <geos/export.h>
    00025
    00026 #include <geos/algorithm/PointLocator.h> // for RelateComputer composition
    00027 #include <geos/algorithm/LineIntersector.h> // for RelateComputer composition
    00028 #include <geos/geomgraph/NodeMap.h> // for RelateComputer composition
    00029 #include <geos/geom/Coordinate.h> // for RelateComputer composition
    00030
    00031 #include <vector>
    00032 #include <memory>
    00033
    00034 #ifdef _MSC_VER
    00035 #pragma warning(push)
    00036 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
    00037 #endif
    00038
    00039 // Forward declarations
    00040 namespace geos {
    00041         namespace geom {
    00042                 class IntersectionMatrix;
    00043                 class Geometry;
    00044         }
    00045         namespace geomgraph {
    00046                 class GeometryGraph;
    00047                 class Edge;
    00048                 class EdgeEnd;
    00049                 class Node;
    00050                 namespace index {
    00051                         class SegmentIntersector;
    00052                 }
    00053         }
    00054 }
    00055
    00056
    00057 namespace geos {
    00058 namespace operation { // geos::operation
    00059 namespace relate { // geos::operation::relate
    00060
    00075 class GEOS_DLL RelateComputer {
    00076 public:
    00077         RelateComputer(std::vector<geomgraph::GeometryGraph*> *newArg);
    00078         ~RelateComputer();
    00079
    00080         geom::IntersectionMatrix* computeIM();
    00081 private:
    00082
    00083         algorithm::LineIntersector li;
    00084
    00085         algorithm::PointLocator ptLocator;
    00086
    00088         std::vector<geomgraph::GeometryGraph*> *arg;
    00089
    00090         geomgraph::NodeMap nodes;
    00091
    00093         std::auto_ptr<geom::IntersectionMatrix> im;
    00094
    00095         std::vector<geomgraph::Edge*> isolatedEdges;
    00096
    00098         geom::Coordinate invalidPoint;
    00099
    00100         void insertEdgeEnds(std::vector<geomgraph::EdgeEnd*> *ee);
    00101
    00102         void computeProperIntersectionIM(
    00103             geomgraph::index::SegmentIntersector *intersector,
    00104             geom::IntersectionMatrix *imX);
    00105
    00106         void copyNodesAndLabels(int argIndex);
    00107         void computeIntersectionNodes(int argIndex);
    00108         void labelIntersectionNodes(int argIndex);
    00109
    00114         void computeDisjointIM(geom::IntersectionMatrix *imX);
    00115
    00116         void labelNodeEdges();
    00117
    00121         void updateIM(geom::IntersectionMatrix *imX);
    00122
    00131         void labelIsolatedEdges(int thisIndex,int targetIndex);
    00132
    00140         void labelIsolatedEdge(geomgraph::Edge *e,int targetIndex,
    00141                                const geom::Geometry *target);
    00142
    00152         void labelIsolatedNodes();
    00153
    00157         void labelIsolatedNode(geomgraph::Node *n,int targetIndex);
    00158 };
    00159
    00160
    00161 } // namespace geos:operation:relate
    00162 } // namespace geos:operation
    00163 } // namespace geos
    00164
    00165 #ifdef _MSC_VER
    00166 #pragma warning(pop)
    00167 #endif
    00168
    00169 #endif // GEOS_OP_RELATE_RELATECOMPUTER_H
    00170
    00171 /**********************************************************************
    00172  * $Log$
    00173  * Revision 1.1  2006/03/21 13:11:29  strk
    00174  * opRelate.h header split
    00175  *
    00176  **********************************************************************/
    00177