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

- File List

# MonotoneChainBuilder.h

    00001 /**********************************************************************
    00002  * $Id: MonotoneChainBuilder.h 2556 2009-06-06 22:22:28Z strk $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2001-2002 Vivid Solutions Inc.
    00008  *
    00009  * This is free software; you can redistribute and/or modify it under
    00010  * the terms of the GNU Lesser General Public Licence as published
    00011  * by the Free Software Foundation.
    00012  * See the COPYING file for more information.
    00013  *
    00014  **********************************************************************
    00015  *
    00016  * Last port: index/chain/MonotoneChainBuilder.java rev 1.12 (JTS-1.10)
    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 // 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 size_t findChainEnd(const geom::CoordinateSequence& pts,
    00101                                                            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
    00110 /**********************************************************************
    00111  * $Log$
    00112  * Revision 1.1  2006/03/22 18:12:31  strk
    00113  * indexChain.h header split.
    00114  *
    00115  **********************************************************************/
    00116