GEOS 3.16.0dev
LineToCurveConverter.h
1/**********************************************************************
2*
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2025-2026 ISciences, LLC
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/export.h>
18#include <geos/geom/util/CurveBuilder.h>
19
20#include <memory>
21
22namespace geos::algorithm {
23 class LineToCurveParams;
24}
25
26namespace geos::geom {
27 class CircularArc;
28 class CoordinateSequence;
29 class Curve;
30 class GeometryFactory;
31 class LineString;
32 class SimpleCurve;
33}
34
35namespace geos::algorithm {
36
37class GEOS_DLL LineToCurveConverter {
38
39public:
40
44 static std::unique_ptr<geom::Curve> getCurved(const geom::LineString& ls, const LineToCurveParams& params);
45
46private:
47
48 explicit LineToCurveConverter(const geom::GeometryFactory& factory, bool outputZ, bool outputM);
49
50 std::unique_ptr<geom::Curve> compute(const geom::LineString& ls, const LineToCurveParams& params);
51
52 void addArc(const geom::CircularArc& arc, std::size_t stop);
53
54 void addLineCoords(const geom::CoordinateSequence& points, std::size_t from, std::size_t to);
55
56 geom::util::CurveBuilder curveBuilder;
57
59 LineToCurveConverter(const LineToCurveConverter& other);
60 LineToCurveConverter& operator=(const LineToCurveConverter& rhs);
61};
62
63}
Contains classes and interfaces implementing fundamental computational geometry algorithms.
Definition Angle.h:32
Definition Angle.h:26