00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GEOS_GEOMGRAPH_INDEX_MONOTONECHAINEDGE_H
00018 #define GEOS_GEOMGRAPH_INDEX_MONOTONECHAINEDGE_H
00019
00020 #include <geos/geom/Envelope.h>
00021
00022
00023 namespace geos {
00024 namespace geom {
00025 class CoordinateSequence;
00026 }
00027 namespace geomgraph {
00028 class Edge;
00029 namespace index {
00030 class SegmentIntersector;
00031 }
00032 }
00033 }
00034
00035 namespace geos {
00036 namespace geomgraph {
00037 namespace index {
00038
00039 class MonotoneChainEdge {
00040 public:
00041
00042 ~MonotoneChainEdge();
00043 MonotoneChainEdge(Edge *newE);
00044 const geom::CoordinateSequence* getCoordinates();
00045 std::vector<int>& getStartIndexes();
00046 double getMinX(int chainIndex);
00047 double getMaxX(int chainIndex);
00048
00049 void computeIntersects(const MonotoneChainEdge &mce,
00050 SegmentIntersector &si);
00051
00052 void computeIntersectsForChain(int chainIndex0,
00053 const MonotoneChainEdge &mce, int chainIndex1,
00054 SegmentIntersector &si);
00055
00056 protected:
00057 Edge *e;
00058 const geom::CoordinateSequence* pts;
00059
00060
00061 std::vector<int> startIndex;
00062
00063 geom::Envelope env1;
00064 geom::Envelope env2;
00065 private:
00066 void computeIntersectsForChain(int start0, int end0,
00067 const MonotoneChainEdge &mce,
00068 int start1, int end1,
00069 SegmentIntersector &ei);
00070 };
00071
00072
00073
00074 }
00075 }
00076 }
00077
00078 #endif
00079
00080
00081
00082
00083
00084
00085
00086