GEOS  3.14.0dev
Intersection.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2019 Paul Ramsey <pramsey@cleverlephant.ca>
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 <geos/geom/Coordinate.h>
19 #include <geos/geom/CoordinateSequence.h>
20 
21 namespace geos {
22 namespace algorithm {
23 
24 
36 class GEOS_DLL Intersection {
37 
38 public:
39 
54 static geom::CoordinateXY intersection(const geom::CoordinateXY& p1, const geom::CoordinateXY& p2,
55  const geom::CoordinateXY& q1, const geom::CoordinateXY& q2);
56 
72 static geom::CoordinateXY intersectionLineSegment(
73  const geom::CoordinateXY& line1,
74  const geom::CoordinateXY& line2,
75  const geom::CoordinateXY& seg1,
76  const geom::CoordinateXY& seg2);
77 
78 
79 };
80 
81 
82 } // namespace geos::algorithm
83 } // namespace geos
84 
Functions to compute intersection points between lines and line segments.
Definition: Intersection.h:36
static geom::CoordinateXY intersection(const geom::CoordinateXY &p1, const geom::CoordinateXY &p2, const geom::CoordinateXY &q1, const geom::CoordinateXY &q2)
Computes the intersection point of two lines. If the lines are parallel or collinear this case is det...
static geom::CoordinateXY intersectionLineSegment(const geom::CoordinateXY &line1, const geom::CoordinateXY &line2, const geom::CoordinateXY &seg1, const geom::CoordinateXY &seg2)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25