• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List

DirectedEdgeStar.h

00001 /**********************************************************************
00002  * $Id: DirectedEdgeStar.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) 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  * Last port: geomgraph/DirectedEdgeStar.java rev. 1.4 (JTS-1.10)
00018  *
00019  **********************************************************************/
00020 
00021 
00022 #ifndef GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
00023 #define GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
00024 
00025 #include <geos/export.h>
00026 #include <set>
00027 #include <string>
00028 #include <vector>
00029 
00030 #include <geos/geomgraph/EdgeEndStar.h>  // for inheritance
00031 #include <geos/geomgraph/Label.h>  // for private member
00032 #include <geos/geom/Coordinate.h>  // for p0,p1
00033 
00034 #include <geos/inline.h>
00035 
00036 // Forward declarations
00037 namespace geos {
00038         namespace geomgraph {
00039                 class DirectedEdge;
00040                 class EdgeRing;
00041         }
00042 }
00043 
00044 namespace geos {
00045 namespace geomgraph { // geos.geomgraph
00046 
00055 class GEOS_DLL DirectedEdgeStar: public EdgeEndStar {
00056 
00057 public:
00058 
00059         DirectedEdgeStar()
00060                 :
00061                 EdgeEndStar(),
00062                 resultAreaEdgeList(0),
00063                 label()
00064         {}
00065 
00066         ~DirectedEdgeStar() {
00067                 delete resultAreaEdgeList;
00068         }
00069 
00071         void insert(EdgeEnd *ee);
00072 
00073         Label &getLabel() { return label; }
00074 
00075         int getOutgoingDegree();
00076 
00077         int getOutgoingDegree(EdgeRing *er);
00078 
00079         DirectedEdge* getRightmostEdge();
00080 
00085         void computeLabelling(std::vector<GeometryGraph*> *geom); // throw(TopologyException *);
00086 
00091         void mergeSymLabels();
00092 
00094         void updateLabelling(Label *nodeLabel);
00095 
00096 
00114         void linkResultDirectedEdges(); // throw(TopologyException *);
00115 
00116         void linkMinimalDirectedEdges(EdgeRing *er);
00117 
00118         void linkAllDirectedEdges();
00119 
00126         void findCoveredLineEdges();
00127 
00133         void computeDepths(DirectedEdge *de);
00134 
00135         std::string print();
00136 
00137 private:
00138 
00142         std::vector<DirectedEdge*> *resultAreaEdgeList;
00143 
00144         Label label;
00145 
00149         std::vector<DirectedEdge*>* getResultAreaEdges();
00150 
00152         enum {
00153                 SCANNING_FOR_INCOMING=1,
00154                 LINKING_TO_OUTGOING
00155         };
00156 
00157         int computeDepths(EdgeEndStar::iterator startIt,
00158                 EdgeEndStar::iterator endIt, int startDepth);
00159 };
00160 
00161 
00162 } // namespace geos.geomgraph
00163 } // namespace geos
00164 
00165 //#ifdef GEOS_INLINE
00166 //# include "geos/geomgraph/DirectedEdgeEndStar.inl"
00167 //#endif
00168 
00169 #endif // ifndef GEOS_GEOMGRAPH_DIRECTEDEDGEENDSTAR_H
00170 
00171 /**********************************************************************
00172  * $Log$
00173  * Revision 1.4  2006/03/24 09:52:41  strk
00174  * USE_INLINE => GEOS_INLINE
00175  *
00176  * Revision 1.3  2006/03/23 15:10:29  strk
00177  * Dropped by-pointer TopologyException constructor, various small cleanups
00178  *
00179  * Revision 1.2  2006/03/15 17:17:41  strk
00180  * Added missing forward declarations
00181  *
00182  * Revision 1.1  2006/03/09 16:46:49  strk
00183  * geos::geom namespace definition, first pass at headers split
00184  *
00185  **********************************************************************/
00186 

Generated on Thu Jul 22 2010 for GEOS by  doxygen 1.7.1