确定多个点的质心 [英] Determine the centroid of multiple points
问题描述
我在写一个映射应用程序,我正在用python编写,我需要获得N个点的纬度/经度质心。
说我有两个地点
I'm writing a mapping application that I am writing in python and I need to get the lat/lon centroid of N points. Say I have two locations
a.lat = 101
a.lon = 230
b.lat = 146
b.lon = 200
使用欧几里得公式很容易得到两点的中心点。我希望
能够做到更多两分。
Getting the center of two points is fairly easy using a euclidean formula. I would like to be able to do it for more then two points.
基本上,我正在寻找像 http://a.placebetween.us/ ,可以输入多个地址并找到每个人都等距的地点。
Fundamentally I'm looking to do something like http://a.placebetween.us/ where one can enter multiple addresses and find a the spot that is equidistant for everyone.
推荐答案
查看下面链接的pdf文档。它解释了如何应用比尔蜥蜴提到的平面图算法,但在球体表面。
Have a look at the pdf document linked below. It explains how to apply the plane figure algorithm that Bill the Lizard mentions, but on the surface of a sphere.
海报缩略图和一些细节http://img51.imageshack.us/img51/4093/centroidspostersummary.jpg
来源: http://www.jennessent.com/arcgis/shapes_poster.htm
还有一个 25 MB全尺寸PDF 可供下载。
Credit to <一个href =https://stackoverflow.com/users/6109/mixdev> mixdev 用于查找原始来源的链接,当然还有Jenness Enterprises提供的信息。注意:我与这篇文章的作者没有任何关系。
poster thumbnail and some details http://img51.imageshack.us/img51/4093/centroidspostersummary.jpg
Source: http://www.jennessent.com/arcgis/shapes_poster.htm
There is also a 25 MB full-size PDF available for download.
Credit goes to mixdev for finding the link to the original source, and of course to Jenness Enterprises for making the information available. Note: I am in no way affiliated with the author of this material.
这篇关于确定多个点的质心的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!