using boost::geometry, project a new point using distance and azimuth

Viewed 106

using a starting lon/lat point, a distance, and azimuth, how can I get the coordinates of a new point? Ideally, this would be implemented using wgs84.

#include <boost/geometry/algorithms/distance.hpp>
#include <boost/geometry/geometries/point_xy.hpp>

// The inverse of what I'm trying to do
boost::geometry::model::d2::point_xy<double> point_a(0, 0);
boost::geometry::model::d2::point_xy<double> point_b(1, 0);
double distance_between_points = boost::geometry::distance(a, b);

// what I'm trying to do
boost::geometry::model::d2::point_xy<double> point_a(0, 0);
double distance_km{111.32};
double azimuth_deg{90};
// point_c should be approximatly (0, 1)
// this is not a real function signature for distance
boost::geometry::model::d2::point_xy<double> point_c = boost::geometry::distance(point_a, distance_km, azimuth_deg);
0 Answers
Related