确定在给定 GeoPoints 列表的情况下对地图进行动画处理
我的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我曾经解决过您为我不久前编写的房地产应用程序描述的完全相同的问题。对我有用的是:
(质心,平均纬度和
lons 或其他)
2(或任何适合您的阈值)
你循环)直到没有更多
在步骤 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:
(centroid, average the lats and
lons, or whatever)
2 (or whatever threshold for you)
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!