从 OpenStreetMap 获取地点/街道等列表?

发布于 2024-11-30 16:37:22 字数 147 浏览 1 评论 0原文

给定纬度/经度组合以及从该点开始的半径(以公里为单位,如果有区别的话),有人知道我可以用来获取所有地点列表的服务/API(甚至下载)吗、街道等来自所提供的纬度/经度的圆圈内?当我说所有地方时,我对一切都感兴趣 - 从水体到学校。

非常感谢您的帮助,非常感谢。 :)

Given a latitude/longitude combination as well as a radius from that point (in km, if it makes a difference), does anybody know of a service/API (or even download) that I can use to obtain a list of all the places, streets etc. from within the circle originating from the latitude/longitude supplied? When I say all the places, I am interested in everything - from bodies of water to schools.

Many thanks for any assistance, it's greatly appreciated. :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

静若繁花 2024-12-07 16:37:22

OSMAXPI,这是一种 Web 服务协议,可以实现某些功能你正在寻找。您的情况存在几个问题:

  1. 有一种方法可以基于边界框(因此不是由半径定义的圆形区域)查询OSM数据。
  2. 该区域的大小以及通过单个查询可以获取的数据量是有限的。

另一种方法是下载 Planet OSM 文件并设置您自己的数据库和 API
服务,但这需要大量的硬件资源,因为数据库非常大并且每天都在增长。

另请查看其他一些相关的 QA:

There's OSMAXPI, a web service protocol which enables some of the things you're looking for. There are several problems in your case:

  1. There's a way to query OSM data based on a bounding box (so not a circular area defined by a radius).
  2. There is a limit of how large the area is and how much data you can fetch with a single query.

The alternative is to download Planet OSM file and set up your own database and API
serving, but this requires a lot of HW resources, since the database is quite large and growing daily.

Also take a look at some other related QA:

紫竹語嫣☆ 2024-12-07 16:37:22

有人提供了一个名为 Overpass 的 API,它允许您提交任意复杂的查询并仅获取您需要的数据。如果你想要绝对所有东西都在某个边界框中或与某个边界框重叠,这些符文对我有用(替换你自己的边界框;抱歉,它不是一个圆形,而是一个以度为单位的矩形)。在查询表单中使用它们 http://www.overpass-api.de/query_form.html< /a>.

<osm-script timeout="10000" element-limit="1073741824">
  <union into="_">
    <bbox-query into="_" s="52.3170669250001" n="52.4027433480001" w="4.80527567900009" e="4.97793537400008"/>
    <recurse from="_" into="_" type="up"/>
    <recurse from="_" into="_" type="down"/>
  </union>
  <print from="_" limit="" mode="meta" order="id"/>
</osm-script>

如果您想要数据子集,请查看此处的示例:http://wiki.openstreetmap.org /wiki/Overpass_API/Language_Guide。警告:这对我来说太复杂了,无法理解。祝你好运!

There is an API provided by some people called Overpass which allows you to submit arbitrarily complex queries and get just the data you need. If you want absolutely everything in or overlapping a certain bounding box, these runes work for me (substitute your own bounding box; sorry, it's not a circle but a rectangle in degrees). Use them in the query form at http://www.overpass-api.de/query_form.html.

<osm-script timeout="10000" element-limit="1073741824">
  <union into="_">
    <bbox-query into="_" s="52.3170669250001" n="52.4027433480001" w="4.80527567900009" e="4.97793537400008"/>
    <recurse from="_" into="_" type="up"/>
    <recurse from="_" into="_" type="down"/>
  </union>
  <print from="_" limit="" mode="meta" order="id"/>
</osm-script>

If you want a subset of data, look at the examples here: http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide. Warning: it's far too complicated for me to understand. Best of luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文