00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GEOS_IDX_CHAIN_MONOTONECHAINBUILDER_H
00021 #define GEOS_IDX_CHAIN_MONOTONECHAINBUILDER_H
00022
00023 #include <geos/export.h>
00024 #include <vector>
00025
00026
00027 namespace geos {
00028 namespace geom {
00029 class CoordinateSequence;
00030 }
00031 namespace index {
00032 namespace chain {
00033 class MonotoneChain;
00034 }
00035 }
00036 }
00037
00038 namespace geos {
00039 namespace index {
00040 namespace chain {
00041
00048 class GEOS_DLL MonotoneChainBuilder {
00049
00050 public:
00051
00052 MonotoneChainBuilder(){}
00053
00059 static std::vector<MonotoneChain*>* getChains(
00060 const geom::CoordinateSequence *pts,
00061 void* context);
00062
00068 static void getChains(const geom::CoordinateSequence *pts,
00069 void* context,
00070 std::vector<MonotoneChain*>& mcList);
00071
00072 static std::vector<MonotoneChain*>* getChains(const geom::CoordinateSequence *pts)
00073 {
00074 return getChains(pts, NULL);
00075 }
00076
00084 static void getChainStartIndices(const geom::CoordinateSequence& pts,
00085 std::vector<std::size_t>& startIndexList);
00086
00087 private:
00088
00100 static size_t findChainEnd(const geom::CoordinateSequence& pts,
00101 size_t start);
00102 };
00103
00104 }
00105 }
00106 }
00107
00108 #endif // GEOS_IDX_CHAIN_MONOTONECHAINBUILDER_H
00109
00110
00111
00112
00113
00114
00115
00116