GEOS  3.13.1
OuterShellsExtracter.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2024 Martin Davis
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 <vector>
18 
19 namespace geos {
20 namespace geom {
21 class Coordinate;
22 class CoordinateSequence;
23 class Envelope;
24 class Geometry;
25 class GeometryCollection;
26 class GeometryFactory;
27 class LinearRing;
28 class Polygon;
29 }
30 }
31 
34 
35 namespace geos {
36 namespace algorithm { // geos::algorithm
37 namespace hull { // geos::algorithm::hull
38 
47 private:
48 
50 
51  void extractOuterShells(std::vector<const LinearRing*>& outerShells);
52 
53  bool isOuter(const LinearRing& shell, std::vector<const LinearRing*>& outerShells);
54 
55  bool covers(const LinearRing& shellA, const LinearRing& shellB);
56 
57  bool isPointInRing(const LinearRing& shell, const LinearRing& shellRing);
58 
59  static void extractShellRings(const Geometry& polygons, std::vector<const LinearRing*>& shells);
60 
61  static bool envelopeAreaComparator(
62  const LinearRing* g1,
63  const LinearRing* g2);
64 
65  const Geometry& geom;
66 
67 public:
68  static void extractShells(const Geometry* polygons, std::vector<const LinearRing*>& shells);
69 
70 };
71 
72 } // geos::algorithm::hull
73 } // geos::algorithm
74 } // geos
75 
Definition: OuterShellsExtracter.h:46
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
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