GEOS 3.11.1
Distance.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2018 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 * Last port: algorithm/Distance.java @ 2017-09-04
16 *
17 **********************************************************************/
18
19#pragma once
20
21#include <geos/export.h>
22#include <geos/geom/Coordinate.h>
23#include <geos/geom/CoordinateSequence.h>
24
25namespace geos {
26namespace algorithm { // geos::algorithm
27
34class GEOS_DLL Distance {
35public:
36
51 // formerly distanceLineLine
52 static double segmentToSegment(const geom::Coordinate& A,
53 const geom::Coordinate& B,
54 const geom::Coordinate& C,
55 const geom::Coordinate& D);
56
66 static double pointToSegmentString(const geom::Coordinate& p,
67 const geom::CoordinateSequence* seq);
68
82 // formerly distancePointLine
83 static double pointToSegment(const geom::Coordinate& p,
84 const geom::Coordinate& A,
85 const geom::Coordinate& B);
86
99 // formerly distancePointLinePerpendicular
101 const geom::Coordinate& A,
102 const geom::Coordinate& B);
103
104};
105
106} // namespace geos::algorithm
107} // namespace geos
108
Functions to compute distance between basic geometric structures.
Definition: Distance.h:34
static double pointToLinePerpendicular(const geom::Coordinate &p, const geom::Coordinate &A, const geom::Coordinate &B)
static double segmentToSegment(const geom::Coordinate &A, const geom::Coordinate &B, const geom::Coordinate &C, const geom::Coordinate &D)
static double pointToSegmentString(const geom::Coordinate &p, const geom::CoordinateSequence *seq)
static double pointToSegment(const geom::Coordinate &p, const geom::Coordinate &A, const geom::Coordinate &B)
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:44
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
Basic namespace for all GEOS functionalities.
Definition: geos.h:39