GEOS  3.13.0dev
SubgraphDepthLocater.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/buffer/SubgraphDepthLocater.java r320 (JTS-1.12)
16  *
17  **********************************************************************/
18 
19 #pragma once
20 
21 #include <geos/export.h>
22 
23 #include <vector>
24 
25 #include <geos/geom/LineSegment.h> // for composition
26 
27 // Forward declarations
28 namespace geos {
29 namespace geom {
30 class Coordinate;
31 }
32 namespace geomgraph {
33 class DirectedEdge;
34 }
35 namespace operation {
36 namespace buffer {
37 class BufferSubgraph;
38 class DepthSegment;
39 }
40 }
41 }
42 
43 namespace geos {
44 namespace operation { // geos.operation
45 namespace buffer { // geos.operation.buffer
46 
58 class GEOS_DLL SubgraphDepthLocater {
59 
60 public:
61 
62  SubgraphDepthLocater(std::vector<BufferSubgraph*>* newSubgraphs)
63  :
64  subgraphs(newSubgraphs)
65  {}
66 
68 
69  int getDepth(const geom::Coordinate& p);
70 
71 private:
72 
73  std::vector<BufferSubgraph*>* subgraphs;
74 
76 
85  void findStabbedSegments(const geom::Coordinate& stabbingRayLeftPt,
86  std::vector<DepthSegment*>& stabbedSegments);
87 
97  void findStabbedSegments(const geom::Coordinate& stabbingRayLeftPt,
98  std::vector<geomgraph::DirectedEdge*>* dirEdges,
99  std::vector<DepthSegment*>& stabbedSegments);
100 
110  void findStabbedSegments(const geom::Coordinate& stabbingRayLeftPt,
111  geomgraph::DirectedEdge* dirEdge,
112  std::vector<DepthSegment*>& stabbedSegments);
113 
114 };
115 
116 
117 } // namespace geos::operation::buffer
118 } // namespace geos::operation
119 } // namespace geos
120 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:216
Definition: LineSegment.h:61
A directed EdgeEnd.
Definition: geomgraph/DirectedEdge.h:42
Locates a subgraph inside a set of subgraphs, in order to determine the outside depth of the subgraph...
Definition: SubgraphDepthLocater.h:58
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25