要求:我目前正在制作一个拥有30000条记录的应用程序。要求是有基于位置/感知搜索。例如。距离我目前的地点不到5米。
此服务将如何访问:此服务可通过网络和iOS 应用访问。
开发平台:
基于位置的搜索
我一直在做这方面的一些研究,我将采用 Haversine Formula 为此。但是为了使Haversine公式有效,我需要为我的数据库中的所有记录反向地理代码。 我曾经使用过的唯一反向地理编码服务来自Google,我知道他们不会在没有在他们的地图上显示结果的情况下允许这一点。
注意:地理编码API只能与Google地图一起使用;禁止在地图上显示地理编码结果。
对此有任何帮助将不胜感激。
更新1#
我发现这个SO问题,建议 OpenStreetMap Nominatim
解决方案您可以使用各种地理编码服务,但您很可能必须付费。查看。他们可能会为你的情况而努力。如果这是一个商业冒险,那么花点钱可能会更好,并确保您获得良好的数据。
30,000条记录不会花那么长时间。如果没有速率限制,它应该能够在10-20分钟内完成。我一次对一页2000个记录进行了地理编码(每页100个),花费了5分钟时间。
后来,我建立了位置管理界面。它没有完成,代码也不是最好的,但它可能会给你一个起点。它使用谷歌地理编码,但可以很容易地换出任何其他服务。
galengrover/projects/Store-Locator-Admin/
github/galen/Store-Locator-Admin
Requirement : I am currently working on an app that has over 30000 records. The requirement is to have location based/aware searching. For eg. within 5mi from my present location.
How will this service be accessed : This service will be accessed from both web and iOS app.
Development platforms :
- Web : Cakephp, php and python
- DB : MySql
- iOS : objective-c
- External libraries currently being used : Google Maps Javascript Api v3
Location based searching
I have been doing some research on this subject, and I will be employing Haversine Formula for this. But for Haversine formula to be effective, I need to have reverse geo code for all my records in my DB. The only reverse geocoding service I have ever used is from Google, and I know for a fact that they don't allow this without displaying the results on their map.
Note: the Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited.
Any help on this will be highly appreciated.
Update 1 #
I found this SO question which recommends OpenStreetMap Nominatim
解决方案There are all kinds of geocoding services you can use, but you'll most likely have to pay. Check out Cloudmate. They might work out for your situation. If this is a business venture it might be better to spend a little bit of money and make sure you get good data.
30,000 records wont take that long at all. If there's no rate limit it should be able to be done in 10 - 20 minutes. I've geocoded 2000 records one page at a time(100 on each page) and it took 5 minutes.
A while back I built a locations administration interface. It's not finished and the code is not the greatest but it may give you a starting point. It uses google to geocode but can easily be swapped out for any other service.
galengrover/projects/Store-Locator-Admin/
github/galen/Store-Locator-Admin
更多推荐
如何准备用于位置感知搜索的现有数据库?
发布评论