GEOS 3.15.0beta1
MultiSurface.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/GeometryCollection.h>
18#include <geos/geom/Surface.h>
19
20namespace geos {
21namespace geom {
22class GEOS_DLL MultiSurface : public GeometryCollection {
23 friend class GeometryFactory;
24
25public:
26
27 ~MultiSurface() override;
28
29 std::unique_ptr<MultiSurface> clone() const
30 {
31 return std::unique_ptr<MultiSurface>(cloneImpl());
32 };
33
40 std::unique_ptr<Geometry> getBoundary() const override;
41
43 int getBoundaryDimension() const override;
44
46 Dimension::DimensionType getDimension() const override;
47
48 std::string getGeometryType() const override;
49
50 GeometryTypeId getGeometryTypeId() const override;
51
52 std::unique_ptr<MultiPolygon> getLinearized(const algorithm::CurveToLineParams& params) const {
53 return std::unique_ptr<MultiPolygon>(getLinearizedImpl(params));
54 }
55
56 bool hasDimension(Dimension::DimensionType d) const override
57 {
58 return d == Dimension::A;
59 }
60
61 bool isDimensionStrict(Dimension::DimensionType d) const override
62 {
63 return d == Dimension::A;
64 }
65
66 std::unique_ptr<MultiSurface> reverse() const
67 {
68 return std::unique_ptr<MultiSurface>(reverseImpl());
69 }
70
71protected:
72
73 MultiSurface(std::vector<std::unique_ptr<Geometry>>&& newPolys,
74 const GeometryFactory& newFactory);
75
76 MultiSurface(std::vector<std::unique_ptr<Surface>>&& newPolys,
77 const GeometryFactory& newFactory);
78
79 MultiSurface(const MultiSurface& mp)
80 : GeometryCollection(mp)
81 {};
82
83 MultiSurface* cloneImpl() const override
84 {
85 return new MultiSurface(*this);
86 }
87
88 MultiSurface* getCurvedImpl(const algorithm::LineToCurveParams&) const override { return cloneImpl(); }
89
90 MultiPolygon* getLinearizedImpl(const algorithm::CurveToLineParams&) const override;
91
92 int
93 getSortIndex() const override
94 {
95 return SORTINDEX_MULTISURFACE;
96 };
97
98 MultiSurface* reverseImpl() const override;
99
100};
101}
102}
Represents a collection of heterogeneous Geometry objects.
Definition GeometryCollection.h:51
Definition Angle.h:26
GeometryTypeId
Geometry types.
Definition Geometry.h:78
Basic namespace for all GEOS functionalities.
Definition geos.h:38