GEOS 3.15.0beta1
CurvePolygon.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/SurfaceImpl.h>
18#include <geos/geom/Polygon.h>
19
20namespace geos {
21namespace geom {
22
23class GEOS_DLL CurvePolygon : public SurfaceImpl<Curve> {
24 friend class GeometryFactory;
25
26public:
27 ~CurvePolygon() override = default;
28
29 double getArea() const override;
30
31 std::unique_ptr<Geometry> getBoundary() const override;
32
33 std::unique_ptr<CoordinateSequence> getCoordinates() const override;
34
35 std::string getGeometryType() const override;
36
37 GeometryTypeId getGeometryTypeId() const override;
38
39 std::unique_ptr<CurvePolygon> getCurved(const algorithm::LineToCurveParams&) {
40 return std::unique_ptr<CurvePolygon>(cloneImpl());
41 }
42
43 std::unique_ptr<Polygon> getLinearized(const algorithm::CurveToLineParams&) const;
44
45 bool hasCurvedComponents() const override;
46
47 void normalize() override;
48
49protected:
50 using SurfaceImpl::SurfaceImpl;
51
52 CurvePolygon* cloneImpl() const override;
53
54 Polygon* getLinearizedImpl(const algorithm::CurveToLineParams&) const override;
55
56 CurvePolygon* getCurvedImpl(const algorithm::LineToCurveParams&) const override { return cloneImpl(); }
57
58 int
59 getSortIndex() const override
60 {
61 return SORTINDEX_CURVEPOLYGON;
62 }
63
64 Geometry* reverseImpl() const override;
65};
66
67
68}
69}
Definition Angle.h:26
GeometryTypeId
Geometry types.
Definition Geometry.h:78
Basic namespace for all GEOS functionalities.
Definition geos.h:38