GEOS 3.14.0dev
CircularString.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2024 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/geom/SimpleCurve.h>
18
19namespace geos {
20namespace geom {
21
22class GEOS_DLL CircularString : public SimpleCurve {
23
24public:
25 using SimpleCurve::SimpleCurve;
26
27 friend class GeometryFactory;
28
29 ~CircularString() override;
30
31 std::unique_ptr<CircularString> clone() const;
32
33 std::string getGeometryType() const override;
34
35 GeometryTypeId getGeometryTypeId() const override;
36
37 double getLength() const override;
38
39 bool hasCurvedComponents() const override
40 {
41 return true;
42 }
43
44 bool isCurved() const override {
45 return true;
46 }
47
48 std::unique_ptr<CircularString> reverse() const
49 {
50 return std::unique_ptr<CircularString>(reverseImpl());
51 }
52
53protected:
54
58 CircularString(std::unique_ptr<CoordinateSequence>&& pts,
59 const GeometryFactory& newFactory);
60
61 CircularString* cloneImpl() const override
62 {
63 return new CircularString(*this);
64 }
65
66 void geometryChangedAction() override
67 {
68 envelope = computeEnvelopeInternal(false);
69 }
70
71 int
72 getSortIndex() const override
73 {
74 return SORTINDEX_LINESTRING;
75 };
76
77 CircularString* reverseImpl() const override;
78
79 void validateConstruction();
80
81};
82
83
84}
85}
GeometryTypeId
Geometry types.
Definition Geometry.h:74
Basic namespace for all GEOS functionalities.
Definition geos.h:39