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 hasCurvedTypes()
const override {
92 bool hasM()
const override;
94 bool hasZ()
const override;
96 bool isClosed()
const override;
98 bool isEmpty()
const override;
100 void normalize()
override;
102 std::unique_ptr<CompoundCurve> reverse()
const;
104 void validateConstruction()
const;
109 CompoundCurve(std::vector<std::unique_ptr<SimpleCurve>>&&,
110 const GeometryFactory&);
112 CompoundCurve(
const CompoundCurve&);
114 CompoundCurve& operator=(
const CompoundCurve&);
116 CompoundCurve* cloneImpl()
const override;
118 Envelope computeEnvelopeInternal()
const;
120 void geometryChangedAction()
override
122 envelope = computeEnvelopeInternal();
125 LineString* getLinearizedImpl(
const algorithm::CurveToLineParams&)
const override;
127 CompoundCurve* getCurvedImpl(
const algorithm::LineToCurveParams&)
const override {
return cloneImpl(); }
129 int getSortIndex()
const override
131 return SORTINDEX_COMPOUNDCURVE;
134 CompoundCurve* reverseImpl()
const override;
137 void normalizeClosed();
139 void reverseInPlace();
141 std::vector<std::unique_ptr<SimpleCurve>> curves;
GeometryTypeId
Geometry types.
Definition Geometry.h:78
Basic namespace for all GEOS functionalities.
Definition geos.h:38