查找区域内的路口在使用谷歌地图API [英] Find street intersections within an area in using Google Maps API

查看:365
本文介绍了查找区域内的路口在使用谷歌地图API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定一个方形区域,什么是找到给定区域内的每个路口的大致坐标,最好的方法是什么?

Given a square area, what is the best way to find the approximate coordinates of every street intersection within the given area ?

推荐答案

既然有你的应用程序中没有说明,我不能告诉,如果你需要使用谷歌地图或其他数据源会回答您的需求。 如果 http://openstreetmap.org 满足您的应用程序的需求,那么它很简单:

Since there is no description of your application, I can't tell if you need to use Google Maps or if another data source would answer your needs. If http://openstreetmap.org fulfills the requirements of your application, then it's easy:

  • 的OSM API有一个请求,从一个矩形区域中提取数据。你得到的XML数据。
  • 在过滤器这一数据只保留你有兴趣在大街上,大概就是键=高速公路标签
  • 过滤此只保留属于两个或更多行的各点。

请忽略这一点,如果谷歌地图是一个要求。

Please disregard this if Google Maps is a requirement.

但还是:由于道路数据库的独立存在,上述方法将产生道路交叉口(中纬度/经度坐标)以pretty的有什么,你会得到谷歌地图;-)您可以很高的相关性然后利用这些点来显示他们通过谷歌地图,知道两个数据集是不相同的,所以它不会是完美的。

But still: since the roads exist independently of the database, the above method will yield roads intersections (in lat/long coordinates) with a pretty high correlation with what you would get from Google maps ;-) You can then use those points to display them over a Google map, knowing that both datasets aren't identical so it won't be perfect.

这篇关于查找区域内的路口在使用谷歌地图API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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