GEOS  3.13.0dev
MonotoneChainOverlapAction.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2001-2002 Vivid Solutions 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: index/chain/MonotoneChainOverlapAction.java rev. 1.6 (JTS-1.10)
16  *
17  **********************************************************************/
18 
19 #pragma once
20 
21 #include <geos/export.h>
22 #include <geos/geom/LineSegment.h>
23 
24 
25 // Forward declarations
26 namespace geos {
27 namespace index {
28 namespace chain {
29 class MonotoneChain;
30 }
31 }
32 }
33 
34 namespace geos {
35 namespace index { // geos::index
36 namespace chain { // geos::index::chain
37 
43 
44 protected:
45 
46  geom::LineSegment overlapSeg1;
47 
48  geom::LineSegment overlapSeg2;
49 
50 public:
51 
53 
54  virtual
56 
67  virtual void overlap(const MonotoneChain& mc1, std::size_t start1,
68  const MonotoneChain& mc2, std::size_t start2);
69 
77  virtual void
78  overlap(const geom::LineSegment& /*seg1*/,
79  const geom::LineSegment& /*seg2*/) {}
80 
81 };
82 
83 } // namespace geos::index::chain
84 } // namespace geos::index
85 } // namespace geos
86 
Definition: LineSegment.h:61
The action for the internal iterator for performing overlap queries on a MonotoneChain.
Definition: MonotoneChainOverlapAction.h:42
virtual void overlap(const MonotoneChain &mc1, std::size_t start1, const MonotoneChain &mc2, std::size_t start2)
This function can be overridden if the original chains are needed.
virtual void overlap(const geom::LineSegment &, const geom::LineSegment &)
This is a convenience function which can be overridden to obtain the actual line segments which overl...
Definition: MonotoneChainOverlapAction.h:78
Monotone Chains are a way of partitioning the segments of a linestring to allow for fast searching of...
Definition: index/chain/MonotoneChain.h:85
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25