确定在给定 GeoPoints 列表的情况下对地图进行动画处理

发布于 2024-08-31 21:28:58 字数 170 浏览 3 评论 0原文

我的 Android 应用程序将覆盖层上的一些标记加载到 MapView 上。
标记是根据动态地理点列表放置的。
我想移动地图中心并放大到包含最多项目的区域。
天真地,我可以计算所有点的叠加,但我想从计算中删除距离点质量很远的点。
有没有已知的方法来计算这个? (例如概率、统计......?)

My android application loads some markers on an overlay onto a MapView.
The markers are placed based on a dynamic list of GeoPoints.
I want to move the map center and zoom into the area with most items.
Naively, I can calculate the superposition of all the points, but I would like to remove the points that are very far from the mass of points from the calculation.
Is there a known way to calculate this ? (e.g. probability, statistics .. ?)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

荆棘i 2024-09-07 21:28:59

我曾经解决过您为我不久前编写的房地产应用程序描述的完全相同的问题。对我有用的是:

  • 以某种方式计算中心点
    (质心,平均纬度和
    lons 或其他)
  • 计算该假想点与每个真实引脚之间的距离
  • 使用标准偏差算法并删除距离 StdDev > 的任何引脚。
    2(或任何适合您的阈值)
  • 重复步骤 1 - 3(您每次都会使用新的中心点
    你循环)直到没有更多
    在步骤 3 中删除异常值

这种方法非常适合我的需求。但我确信如果你环顾四周,会有更有趣的方法来解决同样的问题。例如,我发现这篇有趣的 CompSci 论文...

http://people.scs。 carleton.ca/~michiel/outliers.pdf

祝你好运!

I once solved the exact same problem you describe for a real estate app I wrote a little while ago. What worked for me was:

  • Calculate a center point somehow
    (centroid, average the lats and
    lons, or whatever)
  • Calc the distances between this imaginary point and each of your real pins
  • Use a Standard Deviation algorithm and remove any pin whose distance has a StdDev >
    2 (or whatever threshold for you)
  • Repeat steps 1 - 3 (you'll be using a new center point each time
    you loop) until there are no more
    outliers to remove at step 3

This approach work great for my needs. But I'm sure there's more interesting ways to solve the same problem if you look around. For example, I found this interesting CompSci paper...

http://people.scs.carleton.ca/~michiel/outliers.pdf

Good luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文