GEOS
3.6.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2009 Sandro Santilli <strk@keybit.net> 00007 * 00008 * This is free software; you can redistribute and/or modify it under 00009 * the terms of the GNU Lesser General Public Licence as published 00010 * by the Free Software Foundation. 00011 * See the COPYING file for more information. 00012 * 00013 ********************************************************************** 00014 * 00015 * Last port: algorithm/distance/DistanceToPoint.java 1.1 (JTS-1.9) 00016 * 00017 **********************************************************************/ 00018 00019 #ifndef GEOS_ALGORITHM_DISTANCE_DISTANCETOPOINT_H 00020 #define GEOS_ALGORITHM_DISTANCE_DISTANCETOPOINT_H 00021 00022 #include <geos/geom/LineSegment.h> // for composition 00023 00024 namespace geos { 00025 namespace algorithm { 00026 namespace distance { 00027 class PointPairDistance; 00028 } 00029 } 00030 namespace geom { 00031 class Geometry; 00032 class Coordinate; 00033 class LineString; 00034 class Polygon; 00035 } 00036 } 00037 00038 namespace geos { 00039 namespace algorithm { // geos::algorithm 00040 namespace distance { // geos::algorithm::distance 00041 00047 class DistanceToPoint 00048 { 00049 public: 00050 00051 DistanceToPoint() {} 00052 00053 static void computeDistance(const geom::Geometry& geom, 00054 const geom::Coordinate& pt, 00055 PointPairDistance& ptDist); 00056 00057 static void computeDistance(const geom::LineString& geom, 00058 const geom::Coordinate& pt, 00059 PointPairDistance& ptDist); 00060 00061 static void computeDistance(const geom::LineSegment& geom, 00062 const geom::Coordinate& pt, 00063 PointPairDistance& ptDist); 00064 00065 static void computeDistance(const geom::Polygon& geom, 00066 const geom::Coordinate& pt, 00067 PointPairDistance& ptDist); 00068 00069 }; 00070 00071 } // geos::algorithm::distance 00072 } // geos::algorithm 00073 } // geos 00074 00075 #endif // GEOS_ALGORITHM_DISTANCE_DISTANCETOPOINT_H 00076