Subject: [Boost-bugs] [Boost C++ Libraries] #12414: Geometry azimuth does not compile for geographic coordinates
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-08-26 20:51:48
#12414: Geometry azimuth does not compile for geographic coordinates
---------------------------------------+---------------------------
Reporter: Ken Barker <ken.barker@â¦> | Owner: barendgehrels
Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
Version: Boost 1.61.0 | Severity: Problem
Keywords: |
---------------------------------------+---------------------------
Calling `azimuth` to find the relative bearing of one point to another in
geographic coordinates does not compile, e.g.:
{{{
typedef boost::geometry::cs::geographic<boost::geometry::radian>
Wgs84Coords;
typedef boost::geometry::model::point<double, 2, Wgs84Coords>
GeographicPoint;
typedef boost::geometry::srs::spheroid<double> SpheroidType;
double azimuth(GeographicPoint boost_a, GeographicPoint boost_b)
{
return boost::geometry::detail::azimuth<double>(boost_a, boost_b);
}
}}}
or
{{{
double wgs84_azimuth(GeographicPoint boost_a, GeographicPoint boost_b)
{
SpheroidType spheriod(wgs84::a, wgs84::b);
return boost::geometry::detail::azimuth<double>(boost_a, boost_b,
spheriod);
}
}}}
The problem seems to be caused on line 52 of `azimuth.hpp` in
geometry/algorithms/detail, it is:
{{{
return geometry::detail::vincenty_inverse<ReturnType, false, true>
}}}
when it should be:
{{{
return geometry::detail::vincenty_inverse<ReturnType, false,
true>::apply
}}}
The amended line compiles and gives reasonable results.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12414> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC