I'm using the following code to attempt to generate a circle of coordinates a fixed distance (in this case 1km) around a point. I'm basing the formula on Haversine, but the output I'm seeing in Google Earth is an Oval, and not a Circle.
import simplekml import math kml = simplekml.Kml() def GetCirclePointCoordinate(point, bearing): lat = point lon = point d = point R = 6371 brng = bearing * (math.pi / 180) lat1 = lat * (math.pi / 180) lon1 = lon * (math.pi / 180) lat2 = (math.asin(math.sin(lat1)*math.cos(d/R) + math.cos(lat1)*math.sin(d/R)*math.cos(brng)))*(180/math.pi) lon2 = (lon1 + math.atan2(math.sin(brng)*math.sin(d/R)*math.cos(lat1),math.cos(d/R)-math.sin(lat1)*math.sin(lat2)))*(180/math.pi) return lon2,lat2 point = (51.5014,-0.1419,1) # Buckingham Palace, London circle_coords =  for deg in range(360): circle_coords.append(GetCirclePointCoordinate(point,deg)) ls = kml.newlinestring(name="radius", description="radius") ls.coords=circle_coords kml.save("circle.kml")
The output I'm seeing is depicted below:
I was looking at a solution in this post but wondered if there was a way to do this using a more native solution without the various library imports.