GEOS 3.4.2

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

- File List

MonotoneChainBuilder.h
1 /**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2001-2002 Vivid Solutions Inc.
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************
14 *
15 * Last port: index/chain/MonotoneChainBuilder.java r388 (JTS-1.12)
16 *
17 **********************************************************************/
18
19 #ifndef GEOS_IDX_CHAIN_MONOTONECHAINBUILDER_H
20 #define GEOS_IDX_CHAIN_MONOTONECHAINBUILDER_H
21
22 #include <geos/export.h>
23 #include <vector>
24 #include <cstddef>
25
26 // Forward declarations
27 namespace geos {
28 namespace geom {
29 class CoordinateSequence;
30 }
31 namespace index {
32 namespace chain {
33 class MonotoneChain;
34 }
35 }
36 }
37
38 namespace geos {
39 namespace index { // geos::index
40 namespace chain { // geos::index::chain
41
48 class GEOS_DLL MonotoneChainBuilder {
49
50 public:
51
52 MonotoneChainBuilder(){}
53
59 static std::vector<MonotoneChain*>* getChains(
60 const geom::CoordinateSequence *pts,
61 void* context);
62
68 static void getChains(const geom::CoordinateSequence *pts,
69 void* context,
70 std::vector<MonotoneChain*>& mcList);
71
72 static std::vector<MonotoneChain*>* getChains(const geom::CoordinateSequence *pts)
73 {
74 return getChains(pts, NULL);
75 }
76
84 static void getChainStartIndices(const geom::CoordinateSequence& pts,
85 std::vector<std::size_t>& startIndexList);
86
87 private:
88
100 static std::size_t findChainEnd(const geom::CoordinateSequence& pts,
101 std::size_t start);
102 };
103
104 } // namespace geos::index::chain
105 } // namespace geos::index
106 } // namespace geos
107
108 #endif // GEOS_IDX_CHAIN_MONOTONECHAINBUILDER_H
109