17#include <geos/geom/SimpleCurve.h>
24class GEOS_DLL CompoundCurve :
public Curve {
25 friend class GeometryFactory;
28 using Curve::apply_ro;
29 using Curve::apply_rw;
31 void apply_ro(CoordinateFilter* filter)
const override;
33 void apply_ro(CoordinateSequenceFilter& filter)
const override;
35 void apply_rw(CoordinateSequenceFilter& filter)
override;
37 void apply_rw(
const CoordinateFilter* filter)
override;
39 int compareToSameClass(
const Geometry* geom)
const override;
41 std::unique_ptr<CompoundCurve> clone()
const;
43 bool equalsExact(
const Geometry* other,
double tolerance = 0)
46 bool equalsIdentical(
const Geometry* other)
const override;
48 std::unique_ptr<Geometry> getBoundary()
const override;
50 const CoordinateXY* getCoordinate()
const override;
52 uint8_t getCoordinateDimension()
const override;
54 std::unique_ptr<CoordinateSequence> getCoordinates()
const override;
57 const SimpleCurve* getCurveN(std::size_t)
const override;
59 const CoordinateXY& getEndCoordinate()
const override;
61 std::unique_ptr<Point> getEndPoint()
const override;
63 const Envelope* getEnvelopeInternal()
const override
68 std::string getGeometryType()
const override;
72 double getLength()
const override;
75 std::size_t getNumCurves()
const override;
77 std::size_t getNumPoints()
const override;
79 std::unique_ptr<Point> getPointN(std::size_t n)
const override;
81 const CoordinateXY& getStartCoordinate()
const override;
83 std::unique_ptr<Point> getStartPoint()
const override;
85 bool hasCurvedComponents()
const override;
87 bool hasM()
const override;
89 bool hasZ()
const override;
91 bool isClosed()
const override;
93 bool isEmpty()
const override;
95 void normalize()
override;
97 std::unique_ptr<CompoundCurve> reverse()
const;
99 void validateConstruction()
const;
104 CompoundCurve(std::vector<std::unique_ptr<SimpleCurve>>&&,
105 const GeometryFactory&);
107 CompoundCurve(
const CompoundCurve&);
109 CompoundCurve& operator=(
const CompoundCurve&);
111 CompoundCurve* cloneImpl()
const override;
113 Envelope computeEnvelopeInternal()
const;
115 void geometryChangedAction()
override
117 envelope = computeEnvelopeInternal();
120 int getSortIndex()
const override
122 return SORTINDEX_COMPOUNDCURVE;
125 CompoundCurve* reverseImpl()
const override;
128 void normalizeClosed();
130 void reverseInPlace();
132 std::vector<std::unique_ptr<SimpleCurve>> curves;
GeometryTypeId
Geometry types.
Definition Geometry.h:73
Basic namespace for all GEOS functionalities.
Definition geos.h:38