GEOS  3.9.1dev
SubgraphDepthLocater.h
Go to the documentation of this file.
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 #ifndef GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H
20 #define GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H
21 
22 #include <geos/export.h>
23 
24 #include <vector>
25 
26 #include <geos/geom/LineSegment.h> // for composition
27 
28 // Forward declarations
29 namespace geos {
30 namespace geom {
31 class Coordinate;
32 }
33 namespace geomgraph {
34 class DirectedEdge;
35 }
36 namespace operation {
37 namespace buffer {
38 class BufferSubgraph;
39 class DepthSegment;
40 }
41 }
42 }
43 
44 namespace geos {
45 namespace operation { // geos.operation
46 namespace buffer { // geos.operation.buffer
47 
60 
61 public:
62 
63  SubgraphDepthLocater(std::vector<BufferSubgraph*>* newSubgraphs)
64  :
65  subgraphs(newSubgraphs)
66  {}
67 
69 
70  int getDepth(const geom::Coordinate& p);
71 
72 private:
73 
74  std::vector<BufferSubgraph*>* subgraphs;
75 
77 
86  void findStabbedSegments(const geom::Coordinate& stabbingRayLeftPt,
87  std::vector<DepthSegment*>& stabbedSegments);
88 
98  void findStabbedSegments(const geom::Coordinate& stabbingRayLeftPt,
99  std::vector<geomgraph::DirectedEdge*>* dirEdges,
100  std::vector<DepthSegment*>& stabbedSegments);
101 
111  void findStabbedSegments(const geom::Coordinate& stabbingRayLeftPt,
112  geomgraph::DirectedEdge* dirEdge,
113  std::vector<DepthSegment*>& stabbedSegments);
114 
115 };
116 
117 
118 } // namespace geos::operation::buffer
119 } // namespace geos::operation
120 } // namespace geos
121 
122 #endif // ndef GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H
123 
#define GEOS_DLL
Definition: export.h:28
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
std::vector< BufferSubgraph * > * subgraphs
SubgraphDepthLocater(std::vector< BufferSubgraph * > *newSubgraphs)
Locates a subgraph inside a set of subgraphs, in order to determine the outside depth of the subgraph...
Basic namespace for all GEOS functionalities.