MultiCurve.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2024 ISciences, LLC
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************/
#pragma once
#include <geos/geom/Curve.h>
#include <geos/geom/GeometryCollection.h>
namespace geos {
namespace geom {
class GEOS_DLL MultiCurve : public GeometryCollection {
friend class GeometryFactory;
public:
~MultiCurve() override = default;
std::unique_ptr<MultiCurve> clone() const
{
return std::unique_ptr<MultiCurve>(cloneImpl());
};
std::unique_ptr<Geometry> getBoundary() const override;
int getBoundaryDimension() const override;
Dimension::DimensionType getDimension() const override;
const Curve* getGeometryN(std::size_t n) const override;
std::string getGeometryType() const override;
GeometryTypeId getGeometryTypeId() const override;
bool hasDimension(Dimension::DimensionType d) const override
{
return d == Dimension::L;
}
bool isClosed() const;
bool isDimensionStrict(Dimension::DimensionType d) const override
{
return d == Dimension::L;
}
std::unique_ptr<MultiCurve> reverse() const
{
return std::unique_ptr<MultiCurve>(reverseImpl());
}
protected:
MultiCurve(std::vector<std::unique_ptr<Curve>>&& newLines,
const GeometryFactory& newFactory);
MultiCurve(std::vector<std::unique_ptr<Geometry>>&& newLines,
const GeometryFactory& newFactory);
MultiCurve(const MultiCurve& mp)
: GeometryCollection(mp)
{}
MultiCurve* cloneImpl() const override
{
return new MultiCurve(*this);
}
MultiCurve* reverseImpl() const override;
int
getSortIndex() const override
{
return SORTINDEX_MULTICURVE;
};
};
}
}
geos::geom::GeometryCollection
Represents a collection of heterogeneous Geometry objects.
Definition GeometryCollection.h:51
geos::geom
Definition Angle.h:26
geos::geom::GeometryTypeId
GeometryTypeId
Geometry types.
Definition Geometry.h:73
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38