简体   繁体   English

如何通过反向地理编码(Google Maps API)仅获取街道/道路坐标

[英]How to get only street/road coordinates via reverse geocoding (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?几年前有一个类似的要求: 使用 Google Maps API 获取游戏的街道图,我想知道以简单的方式获取此类技术信息是否仍然是一件大事?

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.例如,Google 的 Directions/Roads API 都取决于路线。 OSM/Google Maps API are filled with information around a specified geo location but without any technical data I need. OSM/Google Maps API 充满了有关指定地理位置的信息,但没有我需要的任何技术数据。 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?随着 geocodezip 评论的澄清,我发现了以下相关问题: 如何在 OpenStreetMap 中获得给定位置周围的所有道路?

This fully suits my demand to get specific road information within a certain location using OSM instead of Google Maps API.这完全符合我使用 OSM 而不是 Google Maps API 获取特定位置内特定道路信息的需求。

Many thanks非常感谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM