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

# DirectedEdgeStar.h

    00001 /**********************************************************************
    00002  * $Id: DirectedEdgeStar.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) 2005-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
    00018 #ifndef GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
    00019 #define GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
    00020
    00021 #include <set>
    00022 #include <string>
    00023 #include <vector>
    00024
    00025 #include <geos/geomgraph/EdgeEndStar.h>  // for inheritance
    00026 #include <geos/geomgraph/Label.h>  // for private member
    00027 #include <geos/geom/Coordinate.h>  // for p0,p1
    00028
    00029 #include <geos/inline.h>
    00030
    00031 // Forward declarations
    00032 namespace geos {
    00033         namespace geomgraph {
    00034                 class DirectedEdge;
    00035                 class EdgeRing;
    00036         }
    00037 }
    00038
    00039 namespace geos {
    00040 namespace geomgraph { // geos.geomgraph
    00041
    00051 class DirectedEdgeStar: public EdgeEndStar {
    00052
    00053 public:
    00054
    00055         DirectedEdgeStar()
    00056                 :
    00057                 EdgeEndStar(),
    00058                 resultAreaEdgeList(0),
    00059                 label()
    00060         {}
    00061
    00062         ~DirectedEdgeStar() {
    00063                 delete resultAreaEdgeList;
    00064         }
    00065
    00067         void insert(EdgeEnd *ee);
    00068
    00069         Label &getLabel() { return label; }
    00070
    00071         int getOutgoingDegree();
    00072
    00073         int getOutgoingDegree(EdgeRing *er);
    00074
    00075         DirectedEdge* getRightmostEdge();
    00076
    00081         void computeLabelling(std::vector<GeometryGraph*> *geom); // throw(TopologyException *);
    00082
    00087         void mergeSymLabels();
    00088
    00090         void updateLabelling(Label *nodeLabel);
    00091
    00092
    00110         void linkResultDirectedEdges(); // throw(TopologyException *);
    00111
    00112         void linkMinimalDirectedEdges(EdgeRing *er);
    00113
    00114         void linkAllDirectedEdges();
    00115
    00122         void findCoveredLineEdges();
    00123
    00129         void computeDepths(DirectedEdge *de);
    00130
    00131         std::string print();
    00132
    00133 private:
    00134
    00138         std::vector<DirectedEdge*> *resultAreaEdgeList;
    00139
    00140         Label label;
    00141
    00145         std::vector<DirectedEdge*>* getResultAreaEdges();
    00146
    00148         enum {
    00149                 SCANNING_FOR_INCOMING=1,
    00150                 LINKING_TO_OUTGOING
    00151         };
    00152
    00153         int computeDepths(EdgeEndStar::iterator startIt,
    00154                 EdgeEndStar::iterator endIt, int startDepth);
    00155 };
    00156
    00157
    00158 } // namespace geos.geomgraph
    00159 } // namespace geos
    00160
    00161 //#ifdef GEOS_INLINE
    00162 //# include "geos/geomgraph/DirectedEdgeEndStar.inl"
    00163 //#endif
    00164
    00165 #endif // ifndef GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
    00166
    00167 /**********************************************************************
    00168  * $Log$
    00169  * Revision 1.4  2006/03/24 09:52:41  strk
    00170  * USE_INLINE => GEOS_INLINE
    00171  *
    00172  * Revision 1.3  2006/03/23 15:10:29  strk
    00173  * Dropped by-pointer TopologyException constructor, various small cleanups
    00174  *
    00175  * Revision 1.2  2006/03/15 17:17:41  strk
    00176  * Added missing forward declarations
    00177  *
    00178  * Revision 1.1  2006/03/09 16:46:49  strk
    00179  * geos::geom namespace definition, first pass at headers split
    00180  *
    00181  **********************************************************************/
    00182