Calculate LatLong of point at distance x,y metres from origin LatLong using Boost Geomtry

Viewed 61

I'm using boost geometry (v1.75) to do forward and reverse coordinate transforms, this works Ok.


namespace bg = boost::geometry;
namespace bm = bg::model::d2;


bg::srs::projection<bg::srs::static_epsg<3785> > transform;
bm::point_xy<double, bg::cs::geographic<bg::degree> > origin = { -3.04081, 53.4427}, longLatOut;
bm::point_xy<double, bg::cs::cartesian> xy;
transform.forward(origin, xy);
transform.inverse(xy, longLatOut);

I would like calculate a new point as a result of adding an offset x,y metres to my geographic origin (LatLong) - accuracy is important. I'm stuck on how to do this. Can anyone provide any guidance of the best way to approach this using the boost libs?

Regs

1 Answers

As far as I know, boost has no cartographic projection function, maybe you can try PROJ lib.

Related