GEOS  3.14.0dev
DistanceToPoint.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2009 Sandro Santilli <strk@kbt.io>
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/DistanceToPoint.java 1.1 (JTS-1.9)
16  *
17  **********************************************************************/
18 
19 #pragma once
20 
21 #include <geos/geom/LineSegment.h> // for composition
22 
23 namespace geos {
24 namespace algorithm {
25 namespace distance {
26 class PointPairDistance;
27 }
28 }
29 namespace geom {
30 class Geometry;
31 class Coordinate;
32 class LineString;
33 class Polygon;
34 }
35 }
36 
37 namespace geos {
38 namespace algorithm { // geos::algorithm
39 namespace distance { // geos::algorithm::distance
40 
47 public:
48 
49  DistanceToPoint() {}
50 
51  static void computeDistance(const geom::Geometry& geom,
52  const geom::CoordinateXY& pt,
53  PointPairDistance& ptDist);
54 
55  static void computeDistance(const geom::LineString& geom,
56  const geom::CoordinateXY& pt,
57  PointPairDistance& ptDist);
58 
59  static void computeDistance(const geom::LineSegment& geom,
60  const geom::CoordinateXY& pt,
61  PointPairDistance& ptDist);
62 
63  static void computeDistance(const geom::Polygon& geom,
64  const geom::CoordinateXY& pt,
65  PointPairDistance& ptDist);
66 
67 };
68 
69 } // geos::algorithm::distance
70 } // geos::algorithm
71 } // geos
72 
Definition: DistanceToPoint.h:46
Definition: PointPairDistance.h:36
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Definition: LineSegment.h:61
Definition: LineString.h:66
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25