Fastest way to reduce number of latitude and longitude points

后端 未结 3 1649
攒了一身酷
攒了一身酷 2021-02-20 04:24

I\'m trying to reduce and combine a number of points to the center point of those locations. Right now I\'m brute-forcing it by finding the closest pair, combining those and re

3条回答
  •  闹比i
    闹比i (楼主)
    2021-02-20 05:10

    Have you considered looking at K-Cluster algorithms?

    These kind of algorithms are used to "group" close/related objects (in your case, points) into clusters, based on their nearest Mean. These algorithms are usually quite optimized, and are built to handle large amount of data. In the case of 4000 points -> 1000 points, you would run a 1000-Cluster run on your data, and get back 1000 groups of points, each can be merged to a single point.

提交回复
热议问题