add bearing function ?
Hello, i need bearing function for my project with geopy. I have not found this code in your project Maybe for the next release ? bearing function : http://pastebin.com/JbhWKJ5m,
@vbx feel free to open a pull request adding such a function.
Is this something that would still be welcomed by maintainers? I'd love to be able to use this to get bearing from latitude/longitude.
Hi, I also think this would be a great feature. It looks like you can use bearing (and origin and distance) to calculate a destination. https://geopy.readthedocs.io/en/stable/index.html?highlight=bearing#geopy.distance.Distance.destination.
So would be great if the inverse would be added, i.e. use origin and destination to calculate a bearing.
e.g. see here https://stackoverflow.com/questions/17624310/geopy-calculating-gps-heading-bearing for someone who wanted to do this sort of thing with geopy, but the answers point him to other packages.
One comment there reads "i'm confused... why doesn't geopy have a function for computing this in line with the vincenty function which computes distance? – Michael Oct 7, 2014 at 16:58" that comment has been upvoted 8 times, a lot for a niche area.
This should be "easy" to implement. geopy/distance.py is already pulling in geographiclib.geodesic and all the functionality is there. A regular user or maintainer for geopy should do this (i.e., not me!). I available if there are questions.
Adding my support for this request. See my SO question and hacked together solution here: https://stackoverflow.com/questions/75564161/calculating-points-along-a-line-between-two-points-using-geopy/75600705#75600705
It's weird that geopy:
- does support calculating the distance between a start point and and end point
- does support calculating the location of an end point when given a start point, a distance and a bearing
- does not support calculating the bearing when given the start point and an end point