How to load planet.osm files in JOSM

Hi,

I downloaded a planet.osm.bz2 file and I would like to load it into JOSM, but I get a “Could not read, parsing file failed” error.

Can someone tell me how to load a planet.osm.bz2 file into JOSM?

Thanks

Unpack it, buy about 256GB of main memory, and try to load it.

Seriously though, what are you trying to achieve? The planet.osm.bz2 is an archival dump of the full (current) OSM database. If you want to edit a small area, you download only that specific area in JOSM, then edit it, followed by an upload.

Well I wanted to load a map of the world and then convert extracts of the map to img format using JOSM and mkgmap so that I could load it into my garmin gps. Here are the steps I’m trying to do, if you know of a better way let me know:

  1. Load planet.osm into JOSM.
  2. Extract a section of the map and save it.
  3. Use mkgmap to convert to .img.

Let me know if there is a better way. I don’t wan’t to download the large sections from the osm server cause it would take too long.

How large an area do you need to work with?
Unless you need the whole world, you would probably be better starting with the planet.osm extracts. They are available by continent / country / region etc, and are more sensible file sizes for working with. See http://wiki.openstreetmap.org/wiki/Planet#Extracts

Also, for extracting parts of the planet, try using Osmosis: http://wiki.openstreetmap.org/wiki/Osmosis
It should cope with loading and splitting large files better than JOSM can.

@KingKong56: JOSM is an editor, and there are far better tools out there to cut out a region of your interest out of a larger .osm file. JOSM will just not load or work performantly with huge .osm files.

Most people just use Osmosis to create extracts from another .osm file.

Awesome, thanks guys.