GEOS 3.15.0dev
GeometrySplitter.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2026 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/export.h>
18#include <memory>
19
20namespace geos::geom {
21class Curve;
22class Geometry;
23class Point;
24}
25
26namespace geos::operation::split {
27
28class GEOS_DLL GeometrySplitter {
29
30public:
42 static std::unique_ptr<geom::Geometry>
43 split(const geom::Geometry& geom, const geom::Geometry& splitGeom);
44
45private:
46
47 static std::unique_ptr<geom::Geometry>
48 splitLinealWithEdge(const geom::Geometry& geom, const geom::Geometry& edge);
49
50 static std::unique_ptr<geom::Geometry>
51 splitPolygonalWithEdge(const geom::Geometry& geom, const geom::Geometry& edge);
52
53 static std::unique_ptr<geom::Geometry>
54 splitCurveWithPoint(const geom::Curve& g, const geom::Point& point);
55
56 static std::unique_ptr<geom::Geometry>
57 splitAtPoints(const geom::Geometry& geom, const geom::Geometry& splitPoints);
58
59 class SplitWithPointTransformer;
60
61 static constexpr double POINT_TO_LINE_TOLERANCE = 1e-10;
62};
63
64}
Definition Angle.h:26