Intersection.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2019 Paul Ramsey <pramsey@cleverlephant.ca>
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <geos/geom/Coordinate.h>
#include <geos/geom/CoordinateSequence.h>
namespace geos {
namespace algorithm {
class GEOS_DLL Intersection {
public:
static geom::CoordinateXY intersection(const geom::CoordinateXY& p1, const geom::CoordinateXY& p2,
const geom::CoordinateXY& q1, const geom::CoordinateXY& q2);
static geom::CoordinateXY intersectionLineSegment(
const geom::CoordinateXY& line1,
const geom::CoordinateXY& line2,
const geom::CoordinateXY& seg1,
const geom::CoordinateXY& seg2);
};
} // namespace geos::algorithm
} // namespace geos
geos::algorithm::Intersection
Functions to compute intersection points between lines and line segments.
Definition Intersection.h:36
geos::algorithm::Intersection::intersection
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...
geos::algorithm::Intersection::intersectionLineSegment
static geom::CoordinateXY intersectionLineSegment(const geom::CoordinateXY &line1, const geom::CoordinateXY &line2, const geom::CoordinateXY &seg1, const geom::CoordinateXY &seg2)
geos::algorithm
Contains classes and interfaces implementing fundamental computational geometry algorithms.
Definition Angle.h:32
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38