d***n 发帖数: 832 | 1 给定一个zipcode,如何拿到周围X公里范围内的zipcodes呢
是不是有现在的库可以用的 |
o***g 发帖数: 2784 | 2 这种库应该是有的,但是都是要钱的,跟你老板要
要么google map不知道有没有api,也许可以折腾出来
【在 d***n 的大作中提到】 : 给定一个zipcode,如何拿到周围X公里范围内的zipcodes呢 : 是不是有现在的库可以用的
|
Y**G 发帖数: 1089 | 3 https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding
有了中心点的经度,纬度。然后在X公里范围内产生100个点(具体数目可以商榷),然后
对每个调用reverse geocoding api,然后汇总zip code
【在 d***n 的大作中提到】 : 给定一个zipcode,如何拿到周围X公里范围内的zipcodes呢 : 是不是有现在的库可以用的
|
d***n 发帖数: 832 | 4 多谢楼上两位回复!
我是自己想做一个网站
用户只需要提供zip code
我想搜索附近zip code里的东东(这些东东在我数据库里)
我得知道一个zip code周围有哪些zip codes
自己经费有限,找不到免费方案就只好自己做一个简单的了
只需要cover有限区域,hack一下应该就可以了
觉得这是不是一个不错的面试题 :-) |
l******t 发帖数: 55733 | 5 有遗漏
ReverseGeocoding
【在 Y**G 的大作中提到】 : https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding : 有了中心点的经度,纬度。然后在X公里范围内产生100个点(具体数目可以商榷),然后 : 对每个调用reverse geocoding api,然后汇总zip code
|
T*****e 发帖数: 361 | 6 不知道有没有现成可用的服务或者api,不过你可以自己建一个。Find or compile a
spatial layer/table for zip codes and their boundaries, and run spatial
queries again it.
* If all you need is neighboring zip codes, it is probably much easier and
faster to build a lookup table for all neighboring zip codes for each zip
code.
* If you need nearby zip codes in terms of a predefined set of distances,
you can do the same.
* If you need the full flexibility such as any specified search distance,
then you will likely have to run a spatial query every time. Not difficult
but can be a bit slower.
This should be a piece of case for most GIS programmers :) |
d***n 发帖数: 832 | 7 楼上很专业呀
可惜我对GIS不懂
最关键的有了这些方案
这些数据哪里来
现在打算hack
以后解决好了再来update |
p**r 发帖数: 5853 | 8 网上很多免费zip经纬度的库,
你下一个下来导入到数据库了,
然后再run script把zip之间的distantce给计算好了,
接下来的事情就是用zipcode <>了。 |
n*w 发帖数: 3393 | 9 多年前弄过。 拿到每个zip code的经纬度。直接用SQL server 2008 的Geo功能,很容易
【在 d***n 的大作中提到】 : 给定一个zipcode,如何拿到周围X公里范围内的zipcodes呢 : 是不是有现在的库可以用的
|
d***n 发帖数: 832 | |