Mercator distance from segment to point in meters.
| 25 | |
| 26 | // Mercator distance from segment to point in meters. |
| 27 | double DistanceToSegment(m2::PointD const & segmentBegin, m2::PointD const & segmentEnd, m2::PointD const & point) |
| 28 | { |
| 29 | m2::ParametrizedSegment<m2::PointD> const segment(segmentBegin, segmentEnd); |
| 30 | m2::PointD const projectionPoint = segment.ClosestPointTo(point); |
| 31 | return mercator::DistanceOnEarth(point, projectionPoint); |
| 32 | } |
| 33 | |
| 34 | double DistanceToSegment(Segment const & segment, m2::PointD const & point, IndexGraph & indexGraph) |
| 35 | { |
no test coverage detected