17#include <geos/geom/LineString.h>
18#include <geos/geom/SimpleCurve.h>
25class GEOS_DLL CompoundCurve :
public Curve {
26 friend class GeometryFactory;
29 using Curve::apply_ro;
30 using Curve::apply_rw;
32 void apply_ro(CoordinateFilter* filter)
const override;
34 void apply_ro(CoordinateSequenceFilter& filter)
const override;
36 void apply_rw(CoordinateSequenceFilter& filter)
override;
38 void apply_rw(
const CoordinateFilter* filter)
override;
40 int compareToSameClass(
const Geometry* geom)
const override;
42 std::unique_ptr<CompoundCurve> clone()
const;
44 bool equalsExact(
const Geometry* other,
double tolerance = 0)
47 bool equalsIdentical(
const Geometry* other)
const override;
49 std::unique_ptr<Geometry> getBoundary()
const override;
51 const CoordinateXY* getCoordinate()
const override;
53 uint8_t getCoordinateDimension()
const override;
55 std::unique_ptr<CoordinateSequence> getCoordinates()
const override;
58 const SimpleCurve* getCurveN(std::size_t)
const override;
60 const CoordinateXY& getEndCoordinate()
const override;
62 std::unique_ptr<Point> getEndPoint()
const override;
64 const Envelope* getEnvelopeInternal()
const override
69 std::string getGeometryType()
const override;
73 double getLength()
const override;
76 std::size_t getNumCurves()
const override;
78 std::size_t getNumPoints()
const override;
80 std::unique_ptr<Point> getPointN(std::size_t n)
const override;
82 const CoordinateXY& getStartCoordinate()
const override;
84 std::unique_ptr<Point> getStartPoint()
const override;
86 bool hasCurvedComponents()
const override;
88 bool hasM()
const override;
90 bool hasZ()
const override;
92 bool isClosed()
const override;
94 bool isEmpty()
const override;
96 void normalize()
override;
98 std::unique_ptr<CompoundCurve> reverse()
const;
100 void validateConstruction()
const;
105 CompoundCurve(std::vector<std::unique_ptr<SimpleCurve>>&&,
106 const GeometryFactory&);
108 CompoundCurve(
const CompoundCurve&);
110 CompoundCurve& operator=(
const CompoundCurve&);
112 CompoundCurve* cloneImpl()
const override;
114 Envelope computeEnvelopeInternal()
const;
116 void geometryChangedAction()
override
118 envelope = computeEnvelopeInternal();
121 LineString* getLinearizedImpl(
const algorithm::CurveToLineParams&)
const override;
123 CompoundCurve* getCurvedImpl(
const algorithm::LineToCurveParams&)
const override {
return cloneImpl(); }
125 int getSortIndex()
const override
127 return SORTINDEX_COMPOUNDCURVE;
130 CompoundCurve* reverseImpl()
const override;
133 void normalizeClosed();
135 void reverseInPlace();
137 std::vector<std::unique_ptr<SimpleCurve>> curves;
GeometryTypeId
Geometry types.
Definition Geometry.h:78
Basic namespace for all GEOS functionalities.
Definition geos.h:38