阅读背景:

计算最近点的有效方法是什么?

来源:互联网 

I have objects with location data stored in Core Data, I would like to be able to fetch and display just the nearest point to the current location. I'm aware there are formulas which will calculate the distance from current lat/long to a stored lat/long, but I'm curious about the best way to perform this for a set of 1000+ points stored in Core Data. I know I could just return the points from Core Data to an array and then loop through that looking for the min value for distance between the points but I'd imagine there's a more efficient method, possibly leveraging Core Data in some way.I have objects with location data stored in Cor




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: