您请求的节点过多(限制为 50000)。要么请求更小的区域,要么使用planet.osm

发布于 2024-12-21 08:14:16 字数 277 浏览 0 评论 0 原文

我正在使用 http://www.openstreetmap.org/ 导出实用程序来生成 区域的 .osm(xml 映射文件),以便稍后生成 .map 文件 渗透,但我无法提取 .osm,因为我收到此错误:

“您请求了太多节点(限制为 50000)。要么请求一个 较小的区域,或使用planet.osm”

如何生成超过50.000个节点的地图?如何使用 星球.osm?我被屏蔽了:S

I'm using http://www.openstreetmap.org/ export utility to generate
a .osm (xml map file) of an area, to later generate a .map file with
osmosis, but i can't extract the .osm because i got this error:

"You requested too many nodes (limit is 50000). Either request a
smaller area, or use planet.osm"

How can i generate maps of more than 50.000 nodes? how to use
planet.osm? i'm blocked :S

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

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

发布评论

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

评论(3

还不是爱你 2024-12-28 08:14:16

正如消息所述,如果您需要处理大量数据,通常有两种选择:

  1. 生成较小的请求,然后在处理之前合并它们(通常这可能不是一个理想的方法)。
  2. 下载 planet.osm,这是整个数据库的转储 OpenStreetMap,并对其进行处理。由于它是一个巨大的文件(几 GB),处理该文件的第一步通常是提取您感兴趣的部分,并且已经有可用的预处理提取(例如 在 Geofabrik 上)。

As the message says, if you need to process large amount of data, you generally have two options:

  1. Generate smaller requests, and later merge them before processing (this is probably not an ideal method, generally).
  2. Download planet.osm, which is a database dump of the whole of OpenStreetMap, and process it. Since it is a huge file (several GB), the first step when processing this file is usually to extract the part which is interesting for you, and there are already preprocessed extracts available (e.g. on Geofabrik).
断念 2024-12-28 08:14:16

我最喜欢的方法是使用 Overpass API。操作方法如下:

将类似内容放入 http://www.overpass-api.de 的查询表单中/query_form.html,将四个边界线 s、n、w 和 e 更改为所需数据的南边、北边、西边和东边。 (使用 OpenStreetMap 导出选项卡拖出一个矩形并获取边界。)

<osm-script timeout="10000" element-limit="1073741824">
  <union into="_">
    <bbox-query into="_" s="52" n="52.4" w="4.8" e="5"/>
    <recurse from="_" into="_" type="up"/>
    <recurse from="_" into="_" type="down"/>
  </union>
  <print from="_" limit="" order="id"/>
</osm-script>

我直接从好权威:立交桥开发商之一。我已经成功使用了。一个附带条件:它递归两次,以获取与矩形重叠的关系成员的所有路径,然后获取这些路径中的所有点。

该脚本将超时设置为 10,000 秒,并将元素限制设置为适当大的数字。

My favourite way is to use the Overpass API. Here's how:

Put something like this into the query form at http://www.overpass-api.de/query_form.html, changing the four bounding edges s, n, w, and e to the southern, northern, western and eastern edges of your desired data. (Use the OpenStreetMap export tab to drag out a rectangle and get the bounds.)

<osm-script timeout="10000" element-limit="1073741824">
  <union into="_">
    <bbox-query into="_" s="52" n="52.4" w="4.8" e="5"/>
    <recurse from="_" into="_" type="up"/>
    <recurse from="_" into="_" type="down"/>
  </union>
  <print from="_" limit="" order="id"/>
</osm-script>

I got this method straight from a good authority: one of the Overpass developers. I have used it successfully. One proviso: it recurses twice, to get all the ways that are members of relations overlapping the rectangle, then to get all the points in those ways.

The script sets the timeout to 10,000 seconds and the element limit to a suitably large number.

诺曦 2024-12-28 08:14:16

多种方法从 OpenStreetMap 下载原始地图数据,从小块到通过API(您需要更大的区域)到下载整个地球(比您需要的数据更多)。

在中间地带,可以选择下载国家城市(更像是这样)。或者正如 graham asher 指出的那样,OverpassAPI 是一个灵活的 API,适用于较大的区域。

我有一个工具“XAPI Query Builder”,这使得它很容易计算输出旧式 XAPI/OverpassAPI URL(现在有点过时)或 Osmosis 命令。

一旦您获得所需的数据区域作为文件,例如 bremen.osm ...

来自 MapsForge 文档

使用 XML 格式编写不来梅地图文件并写入文件 /tmp/bremen.map,将地图起始位置设置为不来梅 HBF:

$ bin/osmosis --rx file=../data/bremen.osm --mapfile-writer file=/tmp/bremen.map map-start-position=53.083418,8.81376

看起来相当不错很清楚,但也许你之前就陷入困境了。您是否安装了 osmosis使用地图编写器插件进行设置

There are several ways to download raw map data from OpenStreetMap ranging from small bite-sized chunks via the API (you need larger areas) through to downloading the whole planet (more data than you need).

In the middleground there's options to download pre-prepared files for countries or cities (that's more like it). Or as graham asher points out, the OverpassAPI is a flexible a API which works for largish areas.

I have a tool "XAPI Query Builder", which makes it easy to figure out an old style XAPI/OverpassAPI URL (bit outdated these days) or alternatively an Osmosis command.

Once you have got the desired area of data as file such as bremen.osm ...

From the MapsForge documentation :

"

Write map file for Bremen using XML format and writing into file /tmp/bremen.map, setting map start position to Bremen HBF:

$ bin/osmosis --rx file=../data/bremen.osm --mapfile-writer file=/tmp/bremen.map map-start-position=53.083418,8.81376

"

Seems fairly clear, but maybe you're getting stuck earlier. Did you install osmosis and set it up with the map-writer plugin?

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