GEOS 3.9.1
PolygonExtracter.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2001-2002 Vivid Solutions Inc.
7 * Copyright (C) 2006 Refractions Research Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************/
15
16#ifndef GEOS_GEOM_UTIL_POLYGONEXTRACTER_H
17#define GEOS_GEOM_UTIL_POLYGONEXTRACTER_H
18
19#include <geos/export.h>
20#include <geos/geom/GeometryFilter.h>
21#include <geos/geom/Polygon.h>
22#include <vector>
23
24namespace geos {
25namespace geom { // geos.geom
26namespace util { // geos.geom.util
27
31class GEOS_DLL PolygonExtracter: public GeometryFilter {
32
33public:
34
42 static void getPolygons(const Geometry& geom, std::vector<const Polygon*>& ret);
43
48 PolygonExtracter(std::vector<const Polygon*>& newComps);
49
50 void filter_rw(Geometry* geom) override;
51
52 void filter_ro(const Geometry* geom) override;
53
54private:
55
57 std::vector<const Polygon*>& comps;
58
59 // Declare type as noncopyable
60 PolygonExtracter(const PolygonExtracter& other) = delete;
61 PolygonExtracter& operator=(const PolygonExtracter& rhs) = delete;
62};
63
64} // namespace geos.geom.util
65} // namespace geos.geom
66} // namespace geos
67
68#endif
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition GeometryFilter.h:47
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:188
Definition PolygonExtracter.h:31
static void getPolygons(const Geometry &geom, std::vector< const Polygon * > &ret)
PolygonExtracter(std::vector< const Polygon * > &newComps)
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26