GEOS 3.15.0dev
CircularArcs.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 <array>
18
19#include <geos/export.h>
20#include <geos/geom/Coordinate.h>
21#include <geos/geom/Envelope.h>
22
23namespace geos {
24namespace algorithm {
25
26class GEOS_DLL CircularArcs {
27public:
28
30 static geom::CoordinateXY getCenter(const geom::CoordinateXY& p0, const geom::CoordinateXY& p1,
31 const geom::CoordinateXY& p2);
32
33 static double getAngle(const geom::CoordinateXY& pt, const geom::CoordinateXY& center);
34
35 static double getMidpointAngle(double theta0, double theta2, bool isCCW);
36
37 static geom::CoordinateXY getMidpoint(const geom::CoordinateXY& p0, const geom::CoordinateXY& p2, const geom::CoordinateXY& center, double radius, bool isCCW);
38
40 static void expandEnvelope(geom::Envelope& e, const geom::CoordinateXY& p0, const geom::CoordinateXY& p1,
41 const geom::CoordinateXY& p2);
42
44 static geom::CoordinateXY createPoint(const geom::CoordinateXY& center, double radius, double theta);
45
46};
47
48}
49}
Basic namespace for all GEOS functionalities.
Definition geos.h:38