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

I use the utility http://www.openstreetmap.org/ to generate the .osm file (xml map file) of the area to later create the .map file from osmosis, but I cannot extract the .osm because I received this error:

"You requested too many nodes (50,000 limit). Less area, or use planet.osm"

How can I create maps from over 50,000 nodes? how to use planet.osm? I am blocked: S

+4
source share
3 answers

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

  • Create smaller queries and then combine them before processing (this is probably not an ideal method, usually).
  • Download planet.osm , which is a dump of the entire OpenStreetMap database and processes it. Since this is a huge file (several GB), the first step in processing this file is usually to extract the part you are interested in, and there are already pre-processed excerpts (for example, on Geofabrik ).
+7
source

My favorite way is to use the transition APIs . Here's how:

Put something like this in the query form at http://www.overpass-api.de/query_form.html , changing the four bounding edges s, n, w and e at the south, north, west and east edges of your desired data. (Use the OpenStreetMap export tab to drag the rectangle and get the borders.)

<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 directly from good authority: one of the Overpass developers. I have used it successfully. One caveat: it is repeated twice to get all the paths that are members of the relations that overlap the rectangle, and then get all the points in that direction.

The script sets the wait time to 10,000 seconds, and the element is limited to a sufficiently large number.

+2
source

There are several ways to load raw map data from OpenStreetMap , starting from small bite-sized chunks through the API (you need large areas) through to load the entire planet (more data than you need).

In the middle part there are options for loading pre-prepared downloads of countries or cities (which looks more like this). As Graham asher notes, OverpassAPI (and the less functional XAPI) provides flexible APIs that work in fairly large areas.

I have a XAPI Query Builder tool that makes it easy to determine the XAPI / OverpassAPI URL or, alternatively, the Osmosis command.

Once you get the desired data area as a file, such as bremen.osm ...

From the MapsForge documentation :

"

Write the map file for Bremen using the XML format and write to the /tmp/bremen.map file, setting the map's initial position in Bremen HBF:

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

"

It seems pretty clear, but maybe you are stuck before. Do you install osmosis and configure it using the card plug-in module ?

0
source

Source: https://habr.com/ru/post/1386348/


All Articles