是否有“区域内服务”?基于美国街道地址的算法?
我有一个美国街道地址数据库,我的一位客户为其提供服务。我正在制作一个表格,允许客户输入他们的邮政编码或地址,以查看他们所在地区是否有服务。
是否有“外面”的组件或算法可以用作模板?
我在之前的地理定位项目中使用过 GIS 和 Tiger zips,但不确定这是最好的方法。
I have a database of US based street addresses for which a client of mine offers their services. I am working on a form that would allow a customer to enter in their zip code or address to see if there is service in their area.
Is there a component or an algorithm "out there" somewhere that I can use as a template?
I have played with GIS and the tiger zips in a previous geolocation project but am not sure this is the best way to go.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个粗略的做法:
领土必须是地理上的
以面积单位或
地图上的多边形。
邮政编码多边形的坐标
(您可以解析形状文件)。
与所选邮政编码多边形重叠的多边形
通过执行 重叠多边形
测试。你可以使用Python
shapely 库。
当然,您可以通过添加有关多边形的质心邻近结构或邻接结构的信息来加快速度,从而减少所需的循环。
祝你好运
Here is one crude approach:
territory needs to be geographically
referenced as areal units or
polygons on a map.
coordinates of the zip-code polygons
(you can parse the shapefile).
polygons that overlap the chosen zip-code polygon
by performing an overlapping polygon
test. You can use the python
shapely library.
Of course, you can speed things up by some how adding information on the centroid proximity structure or contiguity structure of the polygons so there was less looping needed.
good luck