GEOS
3.3.6
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.refractions.net 00005 * 00006 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00007 * 00008 * This is free software; you can redistribute and/or modify it under 00009 * the terms of the GNU Lesser General Public Licence as published 00010 * by the Free Software Foundation. 00011 * See the COPYING file for more information. 00012 * 00013 ********************************************************************** 00014 * 00015 * Last port: index/chain/MonotoneChainBuilder.java r388 (JTS-1.12) 00016 * 00017 **********************************************************************/ 00018 00019 #ifndef GEOS_IDX_CHAIN_MONOTONECHAINBUILDER_H 00020 #define GEOS_IDX_CHAIN_MONOTONECHAINBUILDER_H 00021 00022 #include <geos/export.h> 00023 #include <vector> 00024 #include <cstddef> 00025 00026 // Forward declarations 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 { // geos::index 00040 namespace chain { // geos::index::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 std::size_t findChainEnd(const geom::CoordinateSequence& pts, 00101 std::size_t start); 00102 }; 00103 00104 } // namespace geos::index::chain 00105 } // namespace geos::index 00106 } // namespace geos 00107 00108 #endif // GEOS_IDX_CHAIN_MONOTONECHAINBUILDER_H 00109