python:查找围绕某个GPS位置的圆的GPS坐标的优雅方法 [英] python: elegant way of finding the GPS coordinates of a circle around a certain GPS location
问题描述
我有一组用十进制表示法的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.
这篇关于python:查找围绕某个GPS位置的圆的GPS坐标的优雅方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!