Reputation: 37681
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
Upvotes: 6
Views: 13582
Reputation: 2351
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?
Upvotes: 1
Reputation: 1780
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.
Upvotes: 6
Reputation: 8071
As the message says, if you need to process large amount of data, you generally have two options:
Upvotes: 8