python: elegant way of finding the GPS coordinates of a circle around a certain GPS location

coordinates, dictionary, gps, math, python

Solution

Use the formula for "Destination point given distance and bearing from start point" here:

http://www.movable-type.co.uk/scripts/latlong.html

with your centre point as start point, your radius as distance, and loop over a number of bearings from 0 degrees to 360 degrees. That will give you the points on a circle, and will work at the poles because it uses great circles everywhere.

Problem

I have a set of GPS coordinates in decimal notation, and I'm looking for a way to find the coordinates in a circle with variable radius around each location. Here is an example of what I need. It is a circle with `1km` radius around the coordinate `47,11`. What I need is the algorithm for finding the coordinates of the circle, so I can use it in my kml file using a polygon. Ideally for python.

Original source

Related problems