GEOS: DistanceToPoint.h Source File

GEOS 3.3.8

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

DistanceToPoint.h
1 /**********************************************************************
2 * $Id: DistanceToPoint.h 2809 2009-12-06 01:05:24Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2009 Sandro Santilli <strk@keybit.net>
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************
15 *
16 * Last port: algorithm/distance/DistanceToPoint.java 1.1 (JTS-1.9)
17 *
18 **********************************************************************/
19
20 #ifndef GEOS_ALGORITHM_DISTANCE_DISTANCETOPOINT_H
21 #define GEOS_ALGORITHM_DISTANCE_DISTANCETOPOINT_H
22
23 #include <geos/geom/LineSegment.h> // for composition
24
25 namespace geos {
26 namespace algorithm {
27 namespace distance {
28 class PointPairDistance;
29 }
30 }
31 namespace geom {
32 class Geometry;
33 class Coordinate;
34 class LineString;
35 class Polygon;
36 }
37 }
38
39 namespace geos {
40 namespace algorithm { // geos::algorithm
41 namespace distance { // geos::algorithm::distance
42
48 class DistanceToPoint
49 {
50 public:
51
52 DistanceToPoint() {}
53
54 static void computeDistance(const geom::Geometry& geom,
55 const geom::Coordinate& pt,
56 PointPairDistance& ptDist);
57
58 static void computeDistance(const geom::LineString& geom,
59 const geom::Coordinate& pt,
60 PointPairDistance& ptDist);
61
62 static void computeDistance(const geom::LineSegment& geom,
63 const geom::Coordinate& pt,
64 PointPairDistance& ptDist);
65
66 static void computeDistance(const geom::Polygon& geom,
67 const geom::Coordinate& pt,
68 PointPairDistance& ptDist);
69
70 };
71
72 } // geos::algorithm::distance
73 } // geos::algorithm
74 } // geos
75
76 #endif // GEOS_ALGORITHM_DISTANCE_DISTANCETOPOINT_H
77
78 /**********************************************************************
79 * $Log$
80 **********************************************************************/
81