邻近搜索基于纬度和经度 [英] Proximity search based on Latitude and Longitude

查看:157
本文介绍了邻近搜索基于纬度和经度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提出一个市场类型的应用程序,用户在其中输入产品细节和产品的地址,我现在GEO使用谷歌Geod codeR code这个地址为纬度和经度和我进一步处理这一信息纳入MySQL数据库。如果我为在附近搜索用户自定义半径接近搜索工作完美无瑕。但是我不能确定,我怎么会在一个国家的边界​​处理。我不希望从印度人们能够从巴基斯坦查看产品,这将证明一个灾难我的应用程序都是处于战争状态。任何建议,我怎么可以克服这一点。

I am making a market type application, in which users enter product details and product address, now I Geocode this address into latitude and longitude using Google Geodcoder and further I process this information into MySql Database. The proximity search is working flawless if I provide a user defined radius for searching in the vicinity. However I am not able to determine as to how will I handle it at the border of a country. I dont want people from India to be able to view a product from Pakistan, this will prove a disaster for my application as both are at war. Any Suggestions as to how can I overcome this.

我有一些其他的建议也于:<一href=\"http://dba.stackexchange.com/questions/39115/zip-based-search-in-mysql/39138?noredirect=1#comment69710_39138\">http://dba.stackexchange.com/questions/39115/zip-based-search-in-mysql/39138?noredirect=1#comment69710_39138

I had some other suggestions too at: http://dba.stackexchange.com/questions/39115/zip-based-search-in-mysql/39138?noredirect=1#comment69710_39138

不过,我想最好的,这样做的最有效的方式。任何帮助将是非常美联社preciated。

However I want the best and the most efficient way of doing this. Any help would be highly appreciated.

推荐答案

您可以查看以下PDF和国家的限制,我想你可以通过包括 凡国家限制搜索到一个国家='XCountry在您的搜索查询。

You can check the following PDF and for restriction of countries, I think you can restrict the search to a country by including the Where Country = 'XCountry' in your search query.

http://www.arubin.org/files/geo_search.pdf

这篇关于邻近搜索基于纬度和经度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆