Global Positioning System Reference
In-Depth Information
considering the geographical size. Since Germany has a large car industry
and a dense population, it is one of the biggest countries with respect to
street kilometers. Therefore, it serves as a useful intermediate benchmark
for country and continental file sizes.
7.7
Processing Maps with Osmosis
After downloading a continental and/or country openstreetmap, you should
visit
wiki.openstreetmap.org/wiki/Osmosis
and download the OSMosis tool to a ../tools/osmosis-<version> folder. 6
Osmosis is a command-line Java application to process OSM data in
multiple ways by applying the SAX parser on OSM XML files. Since this
book only covered the DOM parser earlier, you might want to have a look
at the Java sources to get familiar with SAX functionality.
(Un)Zipping Maps
With the command line (without linebreak!), the file is unpacked:
D:\<full path>\tools\osmosis-0.37\bin\osmosis.bat
--rx germany.osm.bz2 --wx germany.osm
Although osmosis is capable of processing compressed files, other tools
operate better on uncompressed data and tools like JOSM can only load
(limited) uncompressed data. After processing a digital map, it should
probably be recompressed for shipping with the following command line
options:
--rx germany.osm --wx germany.rezip.osm.bz2
So it's a good idea to get some more precise numbers for the timing for
zipping and unzipping (see Table 7.2).
Note that the built-in bzip of osmosis does not produce optimal unpack-
ing or packing results, and the duration is not linear with the file sizes. In
the long run, it pays o to congure an exclusive packer for the platform's
native implementation. This is vital for commercial maps, where the Eu-
rope map exceeds 100 GB and it can easily take two days only to get the
dataset ready for processing. For the time being, osmosis will be used as a
multipurpose tool.
Another important aspect of commercial maps is the checksum of a
delivery, which is important for legal claims, when tracing map errors back
6 For this chapter version osmosis-0.37 was used.
 
Search WWH ::




Custom Search