如何通过反向地理编码获取街道/道路坐标(Google Maps API) [英] How to get only street/road coordinates via reverse geocoding (Google Maps API)

查看:427
本文介绍了如何通过反向地理编码获取街道/道路坐标(Google Maps API)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在lat / long指定的小区域内,我需要的数据是:允许我在给定的街道坐标之间绘制自定义线条(起点和终点基本上足够,只能从主要街道)。从交叉点坐标也很好,以连接那些我的自定义线。



另一种方法是通过反向地理编码获得指定区域内的所有主要街道名称,然后 - 以某种方式 - 获得每个街道的坐标。

几年前有一个类似的请求:
使用Google Maps API获取游戏的街景图,我想知道它仍然是重要的是以简单的方式实现这种技术信息?

编辑:

我研究了这个话题,但没有结果让我满意正在寻找。例如Google的Directions / Roads API都取决于路线。 OSM / Google Maps API充满了指定地理位置的信息,但没有任何我需要的技术数据。很简单:一组交叉点/街点坐标(它们甚至称为坐标?!)。

我想我迷路了,甚至陷入了困境我自己的搜索短语的条款。我不是在寻找一份副本&粘贴代码片段更像是一个方向或一些提示,关注下一步或完成的方式。

解决方案

通过geocodezip的评论我发现了以下相关问题:
如何获得OpenStreetMap中某个位置的所有道路?



这完全符合我的要求,即使用OSM在特定位置获取特定道路信息而不是Google Maps API。



非常感谢

I'm looking for a solution to get data to create a simple roads-only map.

Within a small area specified by lat/long I need data that allows me to draw custom lines between given street coordinates (start and endpoints are basically enough and only from major streets). Coordinates from intersections are also fine to connect those with my custom lines.

Another approaches would be to get all the major street names within the specified area via reverse geocoding and then - somehow - get coordinates for each of this streets.

There was a similar request a couple years ago: Get street graph for a game using Google Maps API and I'm wondering is it still a big deal to achieve this kind of technical information in a simple way?

EDIT:
I researched the topic but no result gave me the satisfaction I was looking for. For instance Google's Directions/Roads API are both depending on routes. OSM/Google Maps API are filled with information around a specified geo location but without any technical data I need. To be simple: An Array of intersection/street-point coordinates (are they even called coordinates?!).

I think I'm lost - or even stuck - in terms of my own search phrases. I'm not looking for a copy & paste snippet more like a direction or some hints where to focus next or how it is done.

解决方案

With the clarification of geocodezip's comment I've found the following related question: How to get all roads around a given location in OpenStreetMap?

This fully suits my demand to get specific road information within a certain location using OSM instead of Google Maps API.

Many thanks

这篇关于如何通过反向地理编码获取街道/道路坐标(Google Maps API)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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