GEOS  3.13.0dev
ConnectedElementLocationFilter.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2006 Refractions Research Inc.
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  * Last port: operation/distance/ConnectedElementLocationFilter.java b98e8234
16  *
17  **********************************************************************/
18 
19 #pragma once
20 
21 #include <geos/export.h>
22 
23 #include <geos/geom/GeometryFilter.h> // for inheritance
24 #include <geos/operation/distance/GeometryLocation.h>
25 
26 #include <memory>
27 #include <vector>
28 
29 // Forward declarations
30 namespace geos {
31 namespace geom {
32 class Geometry;
33 }
34 }
35 
36 
37 namespace geos {
38 namespace operation { // geos::operation
39 namespace distance { // geos::operation::distance
40 
51 private:
52 
53  std::vector<std::unique_ptr<GeometryLocation>> locations;
57 public:
66  static std::vector<std::unique_ptr<GeometryLocation>> getLocations(const geom::Geometry* geom);
67 
68  void filter_ro(const geom::Geometry* geom) override;
69  void filter_rw(geom::Geometry* geom) override;
70 };
71 
72 
73 } // namespace geos::operation::distance
74 } // namespace geos::operation
75 } // namespace geos
76 
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:186
A ConnectedElementPointFilter extracts a single point from each connected element in a Geometry (e....
Definition: ConnectedElementLocationFilter.h:50
static std::vector< std::unique_ptr< GeometryLocation > > getLocations(const geom::Geometry *geom)
Returns a list containing a point from each Polygon, LineString, and Point found inside the specified...
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25