GEOS 3.11.1
SegmentMCIndex.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2021 Paul Ramsey <pramsey@cleverelephant.ca>
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#pragma once
16
17#include <geos/index/chain/MonotoneChain.h>
18#include <geos/index/strtree/TemplateSTRtree.h>
19
20
21// Forward declarations
22namespace geos {
23namespace geom {
25class Envelope;
26}
27}
28
31using namespace geos::index;
32
33namespace geos {
34namespace operation {
35namespace buffer {
36
37class GEOS_DLL SegmentMCIndex {
38
39private:
40
41 strtree::TemplateSTRtree<const index::chain::MonotoneChain*> index;
42 std::vector<chain::MonotoneChain> segChains;
43
44 void buildIndex(const CoordinateSequence* segs);
45
46public:
47
48 SegmentMCIndex(const CoordinateSequence* segs);
49
50 void query(const Envelope* env, chain::MonotoneChainSelectAction& action);
51};
52
53
54} // geos.operation.buffer
55} // geos.operation
56} // geos
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:44
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
Definition: MonotoneChainSelectAction.h:44
Provides classes for various kinds of spatial indexes.
Definition: DiscreteFrechetDistance.h:50
Basic namespace for all GEOS functionalities.
Definition: geos.h:39