GEOS  3.13.0dev
ConnectedElementPointFilter.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/ConnectedElementPointFilter.java rev. 1.7 (JTS-1.10)
16  *
17  **********************************************************************/
18 
19 #pragma once
20 
21 #include <geos/export.h>
22 
23 #include <geos/geom/GeometryFilter.h> // for inheritance
24 
25 #include <vector>
26 
27 // Forward declarations
28 namespace geos {
29 namespace geom {
30 class CoordinateXY;
31 class Geometry;
32 }
33 }
34 
35 
36 namespace geos {
37 namespace operation { // geos::operation
38 namespace distance { // geos::operation::distance
39 
47 
48 private:
49  std::vector<const geom::CoordinateXY*>* pts;
50 
51 public:
57  static std::vector<const geom::CoordinateXY*>* getCoordinates(const geom::Geometry* geom);
58 
59  ConnectedElementPointFilter(std::vector<const geom::CoordinateXY*>* newPts)
60  :
61  pts(newPts)
62  {}
63 
64  void filter_ro(const geom::Geometry* geom) override;
65 
66  //void filter_rw(geom::Geometry * /*geom*/) {};
67 };
68 
69 
70 } // namespace geos::operation::distance
71 } // namespace geos::operation
72 } // namespace geos
73 
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
Extracts a single point from each connected element in a Geometry (e.g. a polygon,...
Definition: ConnectedElementPointFilter.h:46
static std::vector< const geom::CoordinateXY * > * getCoordinates(const geom::Geometry *geom)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25