GEOS
3.4.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2006 Refractions Research Inc. 00007 * 00008 * This is free software; you can redistribute and/or modify it under 00009 * the terms of the GNU Lesser General Public Licence as published 00010 * by the Free Software Foundation. 00011 * See the COPYING file for more information. 00012 * 00013 ********************************************************************** 00014 * 00015 * Last port: operation/buffer/SubgraphDepthLocater.java r320 (JTS-1.12) 00016 * 00017 **********************************************************************/ 00018 00019 #ifndef GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H 00020 #define GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H 00021 00022 #include <geos/export.h> 00023 00024 #include <vector> 00025 00026 #include <geos/geom/LineSegment.h> // for composition 00027 00028 // Forward declarations 00029 namespace geos { 00030 namespace geom { 00031 class Coordinate; 00032 } 00033 namespace geomgraph { 00034 class DirectedEdge; 00035 } 00036 namespace operation { 00037 namespace buffer { 00038 class BufferSubgraph; 00039 class DepthSegment; 00040 } 00041 } 00042 } 00043 00044 namespace geos { 00045 namespace operation { // geos.operation 00046 namespace buffer { // geos.operation.buffer 00047 00059 class GEOS_DLL SubgraphDepthLocater { 00060 00061 public: 00062 00063 SubgraphDepthLocater(std::vector<BufferSubgraph*> *newSubgraphs) 00064 : 00065 subgraphs(newSubgraphs) 00066 {} 00067 00068 ~SubgraphDepthLocater() {} 00069 00070 int getDepth(const geom::Coordinate &p); 00071 00072 private: 00073 00074 std::vector<BufferSubgraph*> *subgraphs; 00075 00076 geom::LineSegment seg; 00077 00086 void findStabbedSegments(const geom::Coordinate &stabbingRayLeftPt, 00087 std::vector<DepthSegment*>& stabbedSegments); 00088 00098 void findStabbedSegments(const geom::Coordinate &stabbingRayLeftPt, 00099 std::vector<geomgraph::DirectedEdge*> *dirEdges, 00100 std::vector<DepthSegment*>& stabbedSegments); 00101 00111 void findStabbedSegments(const geom::Coordinate &stabbingRayLeftPt, 00112 geomgraph::DirectedEdge *dirEdge, 00113 std::vector<DepthSegment*>& stabbedSegments); 00114 00115 }; 00116 00117 00118 } // namespace geos::operation::buffer 00119 } // namespace geos::operation 00120 } // namespace geos 00121 00122 #endif // ndef GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H 00123