GEOS  3.9.1dev
HoleAssigner.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2019 Daniel Baston <dbaston@gmail.com>
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: operation/polygonize/HoleAssigner.java 0b3c7e3eb0d3e
16  *
17  **********************************************************************/
18 
19 #ifndef GEOS_OP_POLYGONIZE_HOLEASSIGNER_H
20 #define GEOS_OP_POLYGONIZE_HOLEASSIGNER_H
21 
24 
25 #include <vector>
26 
27 namespace geos {
28 namespace operation {
29 namespace polygonize {
30 
39 public:
45  static void assignHolesToShells(std::vector<EdgeRing*> & holes, std::vector<EdgeRing*> & shells);
46 
47 private:
48  explicit HoleAssigner(std::vector<EdgeRing*> & shells) : m_shells(shells) {
49  buildIndex();
50  }
51 
52  void assignHolesToShells(std::vector<EdgeRing*> & holes);
53  void assignHoleToShell(EdgeRing* holeER);
54  std::vector<EdgeRing*> findShells(const geom::Envelope & ringEnv);
55 
56  EdgeRing* findEdgeRingContaining(EdgeRing* testER);
57 
58  void buildIndex();
59 
60  std::vector<EdgeRing*>& m_shells;
62 };
63 }
64 }
65 }
66 
67 #endif
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
Assigns hole rings to shell rings during polygonization.
Definition: HoleAssigner.h:38
#define GEOS_DLL
Definition: export.h:28
A query-only R-tree created using the Sort-Tile-Recursive (STR) algorithm. For two-dimensional spatia...
Definition: STRtree.h:64
geos::index::strtree::STRtree m_shellIndex
Definition: HoleAssigner.h:61
Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an...
Basic namespace for all GEOS functionalities.
std::vector< EdgeRing * > & m_shells
Definition: HoleAssigner.h:60
HoleAssigner(std::vector< EdgeRing * > &shells)
Definition: HoleAssigner.h:48