GEOS  3.13.1
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 
20 namespace geos {
21 namespace geom {
22 class GEOS_DLL MultiSurface : public GeometryCollection {
23  friend class GeometryFactory;
24 
25 public:
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  bool hasDimension(Dimension::DimensionType d) const override
53  {
54  return d == Dimension::A;
55  }
56 
57  bool isDimensionStrict(Dimension::DimensionType d) const override
58  {
59  return d == Dimension::A;
60  }
61 
62  std::unique_ptr<MultiSurface> reverse() const
63  {
64  return std::unique_ptr<MultiSurface>(reverseImpl());
65  }
66 
67 protected:
68 
69  MultiSurface(std::vector<std::unique_ptr<Geometry>>&& newPolys,
70  const GeometryFactory& newFactory);
71 
72  MultiSurface(std::vector<std::unique_ptr<Surface>>&& newPolys,
73  const GeometryFactory& newFactory);
74 
75  MultiSurface(const MultiSurface& mp)
76  : GeometryCollection(mp)
77  {};
78 
79  MultiSurface* cloneImpl() const override
80  {
81  return new MultiSurface(*this);
82  }
83 
84  int
85  getSortIndex() const override
86  {
87  return SORTINDEX_MULTISURFACE;
88  };
89 
90  MultiSurface* reverseImpl() const override;
91 
92 };
93 }
94 }
DimensionType
Definition: Dimension.h:29
@ A
Dimension value of a surface (2).
Definition: Dimension.h:46
GeometryTypeId
Geometry types.
Definition: Geometry.h:74
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25