GEOS  3.13.1
LineStringExtracter.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (c) 2024 Martin Davis
7  * Copyright (C) 2024 Paul Ramsey <pramsey@cleverelephant.ca>
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/geom/GeometryFilter.h>
19 #include <geos/export.h>
20 
21 #include <memory>
22 #include <vector>
23 
24 // Forward declarations
25 namespace geos {
26 namespace geom {
27  class LineString;
28  class Geometry;
29 }
30 }
31 
32 
36 
37 
38 namespace geos { // geos.
39 namespace operation { // geos.operation
40 namespace relateng { // geos.operation.relateng
41 
42 
43 class GEOS_DLL LineStringExtracter : public GeometryFilter {
44 
45 private:
46 
47  std::vector<const LineString*>& comps;
48 
49 
50 public:
51 
52  LineStringExtracter(std::vector<const LineString*>& p_comps)
53  : comps(p_comps)
54  {}
55 
56  void filter_ro(const geom::Geometry* geom) override;
57 
58  static void getLines(const Geometry* geom, std::vector<const LineString*>& lines);
59 
60  static std::vector<const LineString*> getLines(const Geometry* geom);
61 
69  // static std::unique_ptr<Geometry> getGeometry(const Geometry* geom);
70 
71 };
72 
73 
74 } // namespace geos.operation.relateng
75 } // namespace geos.operation
76 } // namespace geos
77 
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: LineString.h:66
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25