GEOS  3.13.0dev
CoverageGapFinder.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2022 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/export.h>
18 #include <vector>
19 #include <memory>
20 
21 
22 // Forward declarations
23 namespace geos {
24 namespace geom {
25 class Geometry;
26 class LinearRing;
27 }
28 }
29 
32 
33 
34 namespace geos { // geos
35 namespace coverage { // geos::coverage
36 
52 class GEOS_DLL CoverageGapFinder {
53 
54 private:
55 
56  std::vector<const Geometry*>& m_coverage;
57 
58  bool isGap(const LinearRing* hole, double gapWidth);
59 
60 
61 public:
62 
68  CoverageGapFinder(std::vector<const Geometry*>& coverage)
69  : m_coverage(coverage)
70  {};
71 
80  static std::unique_ptr<Geometry> findGaps(
81  std::vector<const Geometry*>& coverage,
82  double gapWidth);
83 
91  std::unique_ptr<Geometry> findGaps(double gapWidth);
92 
93 
94 };
95 
96 } // namespace geos::coverage
97 } // namespace geos
98 
99 
100 
101 
102 
103 
104 
105 
106 
Definition: CoverageGapFinder.h:52
static std::unique_ptr< Geometry > findGaps(std::vector< const Geometry * > &coverage, double gapWidth)
CoverageGapFinder(std::vector< const Geometry * > &coverage)
Definition: CoverageGapFinder.h:68
std::unique_ptr< Geometry > findGaps(double gapWidth)
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25