GEOS 3.11.1
RingHullIndex.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/simplify/RingHull.h>
18
19
20namespace geos {
21namespace geom {
22class Envelope;
23}
24}
25
26namespace geos {
27namespace simplify { // geos::simplify
28
29
30class RingHullIndex
31{
32 private:
33
34 std::vector<const RingHull*> hulls;
35 bool m_enabled;
36
37 public:
38
39 RingHullIndex()
40 : m_enabled(true)
41 {};
42
43 bool enabled(void) const { return m_enabled; };
44 void enabled(bool p_enabled) { m_enabled = p_enabled; };
45 void add(const RingHull* ringHull);
46 std::vector<const RingHull*> query(const geos::geom::Envelope& queryEnv) const;
47 std::size_t size() const;
48
49
50}; // RingHullIndex
51
52
53} // geos::simplify
54} // geos
55
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
Basic namespace for all GEOS functionalities.
Definition: geos.h:39