Calculation of Center Point from List of Latitude and Longitude are slightly diffrent from actual

假如想象 提交于 2019-12-04 12:53:21

The correct center depends actually on the definition for center and there are several possibilites:

  1. One might calculate the smallest rectangle containing all points and use the center of this rectangle as you did with your green lines and green point. (This is unusual)

  2. One might ask which point is closest to all other points, i.e. find a center point so that all distances between this center and all other points are smallest (abs-norm, used for practical problems)

  3. One might ask which center point results in the least error, i.e. the smallest (sum of) quadratic distances to all other points (used ins math, statistics, etc)

You see, depending on the definition, you'll have to use a different algorithm and will arrive on a different center point.

The algorithm you show in your question seems to calculate (2.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!