GEOS  3.14.0dev
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 #pragma once
17 
18 #include <geos/export.h>
19 #include <geos/geom/GeometryFilter.h>
20 #include <geos/geom/Polygon.h>
21 #include <vector>
22 
23 namespace geos {
24 namespace geom { // geos.geom
25 namespace util { // geos.geom.util
26 
30 class GEOS_DLL PolygonExtracter: public GeometryFilter {
31 
32 public:
33 
41  static void getPolygons(const Geometry& geom, std::vector<const Polygon*>& ret);
42 
47  PolygonExtracter(std::vector<const Polygon*>& newComps);
48 
49  void filter_rw(Geometry* geom) override;
50 
51  void filter_ro(const Geometry* geom) override;
52 
53 private:
54 
56  std::vector<const Polygon*>& comps;
57 
58  // Declare type as noncopyable
59  PolygonExtracter(const PolygonExtracter& other) = delete;
60  PolygonExtracter& operator=(const PolygonExtracter& rhs) = delete;
61 };
62 
63 } // namespace geos.geom.util
64 } // namespace geos.geom
65 } // namespace geos
66 
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition: GeometryFilter.h:45
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Definition: PolygonExtracter.h:30
static void getPolygons(const Geometry &geom, std::vector< const Polygon * > &ret)
PolygonExtracter(std::vector< const Polygon * > &newComps)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25