GEOS 3.14.0dev
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
19namespace geos {
20namespace geom {
21class Geometry;
22class LinearRing;
23}
24}
25
26namespace geos {
27namespace algorithm { // geos::algorithm
28namespace hull { // geos::algorithm::hull
29
40
41private:
42
44
45 void extractOuterShells(std::vector<const LinearRing*>& outerShells);
46
47 bool isOuter(const LinearRing& shell, std::vector<const LinearRing*>& outerShells);
48
49 bool covers(const LinearRing& shellA, const LinearRing& shellB);
50
51 bool isPointInRing(const LinearRing& shell, const LinearRing& shellRing);
52
53 static void extractShellRings(const Geometry& polygons, std::vector<const LinearRing*>& shells);
54
55 static bool envelopeAreaComparator(
56 const LinearRing* g1,
57 const LinearRing* g2);
58
59 const Geometry& geom;
60
61public:
62 static void extractShells(const Geometry* polygons, std::vector<const LinearRing*>& shells);
63
64};
65
66} // geos::algorithm::hull
67} // geos::algorithm
68} // geos
69
Definition OuterShellsExtracter.h:37
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 geos.h:39