GEOS
3.9.0
include
geos
operation
overlayng
IntersectionPointBuilder.h
1
/**********************************************************************
2
*
3
* GEOS - Geometry Engine Open Source
4
* http://geos.osgeo.org
5
*
6
* Copyright (C) 2020 Paul Ramsey <pramsey@cleverelephant.ca>
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
#pragma once
16
17
#include <geos/geom/Point.h>
18
#include <geos/operation/overlayng/OverlayNG.h>
19
20
#include <geos/export.h>
21
#include <vector>
22
#include <memory>
23
24
// Forward declarations
25
namespace
geos
{
26
namespace
geom {
27
class
GeometryFactory;
28
}
29
namespace
operation {
30
namespace
overlayng {
31
class
OverlayEdge;
32
class
OverlayGraph;
33
class
OverlayLabel;
34
}
35
}
36
}
37
38
namespace
geos
{
// geos.
39
namespace
operation {
// geos.operation
40
namespace
overlayng {
// geos.operation.overlayng
41
60
class
GEOS_DLL
IntersectionPointBuilder
{
61
62
private
:
63
64
// Members
65
OverlayGraph
* graph;
66
const
geom::GeometryFactory
* geometryFactory;
67
std::vector<std::unique_ptr<geom::Point>> points;
73
bool
isAllowCollapseLines;
74
75
// Methods
76
void
addResultPoints();
77
83
bool
isResultPoint(
OverlayEdge
* nodeEdge)
const
;
84
bool
isEdgeOf(
const
OverlayLabel
* label,
int
i)
const
;
85
86
87
public
:
88
89
90
IntersectionPointBuilder
(
OverlayGraph
* p_graph,
const
geom::GeometryFactory
* geomFact)
91
: graph(p_graph)
92
, geometryFactory(geomFact)
93
, isAllowCollapseLines(!
OverlayNG::STRICT_MODE_DEFAULT
)
94
{}
95
96
std::vector<std::unique_ptr<geom::Point>> getPoints();
97
98
IntersectionPointBuilder
(
const
IntersectionPointBuilder
&) =
delete
;
99
IntersectionPointBuilder
& operator=(
const
IntersectionPointBuilder
&) =
delete
;
100
101
void
setStrictMode(
bool
p_isStrictMode)
102
{
103
isAllowCollapseLines = ! p_isStrictMode;
104
}
105
106
107
};
108
109
110
}
// namespace geos.operation.overlayng
111
}
// namespace geos.operation
112
}
// namespace geos
113
geos::operation::overlayng::OverlayGraph
Definition:
OverlayGraph.h:54
geos::operation::overlayng::OverlayEdge
Definition:
OverlayEdge.h:49
geos
Basic namespace for all GEOS functionalities.
Definition:
IndexedNestedRingTester.h:26
geos::operation::overlayng::OverlayLabel
Definition:
OverlayLabel.h:90
geos::operation::overlayng::IntersectionPointBuilder
Definition:
IntersectionPointBuilder.h:60
geos::operation::overlayng::OverlayNG::STRICT_MODE_DEFAULT
static constexpr bool STRICT_MODE_DEFAULT
Definition:
OverlayNG.h:165
geos::geom::GeometryFactory
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition:
GeometryFactory.h:68
Generated by
1.8.20