GEOS 3.14.0dev
Curve.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/Geometry.h>
18
19namespace geos {
20namespace geom {
21
22class SimpleCurve;
23
24class GEOS_DLL Curve : public Geometry {
25
26public:
27 using Geometry::apply_ro;
28 using Geometry::apply_rw;
29
30 void apply_ro(GeometryComponentFilter* filter) const override;
31
32 void apply_ro(GeometryFilter* filter) const override;
33
34 void apply_rw(GeometryComponentFilter* filter) override;
35
36 void apply_rw(GeometryFilter* filter) override;
37
43 int
44 getBoundaryDimension() const override
45 {
46 return isClosed() ? Dimension::False : 0;
47 }
48
50 Dimension::DimensionType getDimension() const override
51 {
52 return Dimension::L; // line
53 }
54
56 virtual bool isClosed() const = 0;
57
59 bool isRing() const;
60
61 virtual std::size_t getNumCurves() const = 0;
62
63 virtual const SimpleCurve* getCurveN(std::size_t) const = 0;
64
65protected:
66 Curve(const GeometryFactory& factory) : Geometry(&factory) {}
67
68};
69
70}
71}
Basic namespace for all GEOS functionalities.
Definition geos.h:39