python:找到围绕某个 GPS 位置的圆的 GPS 坐标的优雅方法标的、优雅、位置、方法

2023-09-07 05:04:16 作者:第三者的第三者

我有一组十进制格式的 GPS 坐标,我正在寻找一种方法来在每个位置周围具有可变半径的圆中找到坐标.

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.

这是我需要的示例.它是一个以1km 为半径的圆,以坐标47,11 为中心.

Here is an example of what I need. It is a circle with 1km radius around the coordinate 47,11.

我需要的是查找圆坐标的算法,所以我可以在我的 kml 文件中使用多边形.非常适合python.

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.

推荐答案

这里使用目标点给定距离和方位角"的公式:

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

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

以您的中心点为起点,以您的半径为距离,并在 0 度到 360 度的多个方位上循环.这会给你一个圆上的点,并且可以在两极工作,因为它在任何地方都使用大圆.

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.