GEOS 3.14.0dev
EdgeString.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2011 Sandro Santilli <strk@kbt.io>
7 * Copyright (C) 2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: operation/linemerge/EdgeString.java r378 (JTS-1.12)
18 *
19 **********************************************************************/
20
21#pragma once
22
23#include <geos/export.h>
24#include <memory>
25#include <vector>
26
27#ifdef _MSC_VER
28#pragma warning(push)
29#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
30#endif
31
32// Forward declarations
33namespace geos {
34namespace geom {
35class GeometryFactory;
36class CoordinateSequence;
37class LineString;
38}
39namespace operation {
40namespace linemerge {
41class LineMergeDirectedEdge;
42}
43}
44}
45
46namespace geos {
47namespace operation { // geos::operation
48namespace linemerge { // geos::operation::linemerge
49
55class GEOS_DLL EdgeString {
56private:
57 const geom::GeometryFactory* factory;
58 std::vector<LineMergeDirectedEdge*> directedEdges;
59 std::unique_ptr<geom::CoordinateSequence> getCoordinates() const;
60public:
67
68 ~EdgeString() = default;
69
73 void add(LineMergeDirectedEdge* directedEdge);
74
78 std::unique_ptr<geom::LineString> toLineString() const;
79};
80
81} // namespace geos::operation::linemerge
82} // namespace geos::operation
83} // namespace geos
84
85#ifdef _MSC_VER
86#pragma warning(pop)
87#endif
88
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:70
A sequence of LineMergeDirectedEdge forming one of the lines that will be output by the line-merging ...
Definition EdgeString.h:55
EdgeString(const geom::GeometryFactory *newFactory)
Constructs an EdgeString with the given factory used to convert this EdgeString to a LineString.
void add(LineMergeDirectedEdge *directedEdge)
std::unique_ptr< geom::LineString > toLineString() const
A DirectedEdge of a LineMergeGraph.
Definition LineMergeDirectedEdge.h:46
Basic namespace for all GEOS functionalities.
Definition geos.h:39