开发者

iPhone spatial search

I want to write 开发者_如何学JAVAan iPhone app, that will need to do a distance based search (eg. find results within 100km)

I'm not concerned about what storage technology is used, as long as it is stored on the device


Although I have never used it, there is a spatial derivative of SQLLiteDB that you could compile and use in your app - then you could issue spatial queries against that database. It's something I have mulled over but never had the chance to try:

http://www.gaia-gis.it/spatialite/


I asked a question a while back intending to build a similar application. I found the answer helpful. I believe what you want to do can be largely accomplished by using CLLocation's getDistanceFrom: method.


What are you asking exactly? What do you need to find?

For a generic case I would maybe use the long/lat coords on the "items" to make a quad-tree and use that to speed up the search.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜