00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H
00017 #define GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H
00018
00019 #include <vector>
00020
00021 #include <geos/geom/LineSegment.h>
00022
00023
00024 namespace geos {
00025 namespace geom {
00026 class Coordinate;
00027 }
00028 namespace geomgraph {
00029 class DirectedEdge;
00030 }
00031 namespace operation {
00032 namespace buffer {
00033 class BufferSubgraph;
00034 class DepthSegment;
00035 }
00036 }
00037 }
00038
00039 namespace geos {
00040 namespace operation {
00041 namespace buffer {
00042
00055 class SubgraphDepthLocater {
00056
00057 public:
00058
00059 SubgraphDepthLocater(std::vector<BufferSubgraph*> *newSubgraphs)
00060 :
00061 subgraphs(newSubgraphs)
00062 {}
00063
00064 ~SubgraphDepthLocater() {}
00065
00066 int getDepth(const geom::Coordinate &p);
00067
00068 private:
00069
00070 std::vector<BufferSubgraph*> *subgraphs;
00071
00072 geom::LineSegment seg;
00073
00082 void findStabbedSegments(const geom::Coordinate &stabbingRayLeftPt,
00083 std::vector<DepthSegment*>& stabbedSegments);
00084
00094 void findStabbedSegments(const geom::Coordinate &stabbingRayLeftPt,
00095 std::vector<geomgraph::DirectedEdge*> *dirEdges,
00096 std::vector<DepthSegment*>& stabbedSegments);
00097
00107 void findStabbedSegments(const geom::Coordinate &stabbingRayLeftPt,
00108 geomgraph::DirectedEdge *dirEdge,
00109 std::vector<DepthSegment*>& stabbedSegments);
00110
00111 };
00112
00113
00114 }
00115 }
00116 }
00117
00118 #endif // ndef GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129