You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2011-02-22 15:52:07

wind
Member
Registered: 2010-03-11
Posts: 90

Map generation: Reduce required disc space

Presently, I am generating maps for my Garmin eTrex Vista Hcx with the following script:

d:
cd \map
wget http://download.geofabrik.de/osm/europe.osm.bz2

7za e -y d:\map\europe.osm.bz2

java -Xmx1600m -cp .\Osmosis\osmosis.jar;.\Osmosis\lib\default\commons-logging-1.1.1.jar;.\Osmosis\lib\default\commons-compress-1.0.jar;.\Osmosis\lib\default\jpf-1.5.jar org.openstreetmap.osmosis.core.Osmosis --read-xml file="europe.osm" --bounding-box idTrackerType=BitSet top=60 left=4 bottom=47 right=16 --write-xml file="Centraleurope.osm"

java -Xmx1600m -jar splitter.jar --max-nodes=600000 Centraleurope.osm

java -Xmx1600m -jar mkgmap.jar --max-jobs --reduce-point-density=10 --description=OSM_DE --country-name=centraleurope --country-abbr=EU --name-tag-list="name:de,name,int_name" --style-file=.\My_Style\ --generate-sea=multipolygon --family-id=1331 --product-id=1 --series-name=OSM_Germany --family-name=OSM_Germany --area-name=Germany --overview-mapname=OSM_Centraleurope --net --gmapsupp --tdbfile --route --add-pois-to-areas --road-name-pois=0x640a --draw-priority=25 --latin1 --make-opposite-cycleways --remove-short-arcs -c template.args My.typ
pause

It works fine and produces a map of germany with some surrounding areas, but it needs about 140 GByte of free harddisc space. The main reason is, that the unpacked file europe.osm has almost 100 GByte in size.

Is there a trick to reduce the necessary disc space, e. g. by letting osmosis access the europe.osm.bz2 file directly?

Last edited by wind (2011-02-23 17:23:03)

Offline

#2 2011-02-22 16:33:21

csdf
Member
From: UK, living in Abu Dhabi
Registered: 2009-08-11
Posts: 313
Website

Re: Map generation: Reduce required disc space

Why don't you just split the europe.osm.bz2 file directly?

Offline

#3 2011-02-22 17:00:32

Vclaw
Member
From: Alba
Registered: 2009-02-25
Posts: 522
Website

Re: Map generation: Reduce required disc space

You could use the PBF format extracts from Geofabrik, they use less disc space than the bz2 files.
Osmosis can read or write in PBF format, and splitter/mkgmap can read from them.

Offline

#4 2011-02-23 17:37:22

wind
Member
Registered: 2010-03-11
Posts: 90

Re: Map generation: Reduce required disc space

Thank you very much for this hint!
I now exchanged the *.osm files by *.osm.bz2 and removed the unzip command:

d:
cd \map
rem wget http://download.geofabrik.de/osm/europe.osm.bz2

java -Xmx1600m -cp .\Osmosis\osmosis.jar;.\Osmosis\lib\default\commons-logging-1.1.1.jar;.\Osmosis\lib\default\commons-compress-1.0.jar;.\Osmosis\lib\default\jpf-1.5.jar org.openstreetmap.osmosis.core.Osmosis --read-xml file="europe.osm.bz2" --bounding-box idTrackerType=BitSet top=60 left=4 bottom=47 right=16 --write-xml file="Centraleurope.osm.bz2"

java -Xmx1600m -jar splitter.jar --max-nodes=600000 Centraleurope.osm.bz2

java -Xmx1600m -jar mkgmap.jar --max-jobs --reduce-point-density=10 --description=OSM_DE --country-name=centraleurope --country-abbr=EU --name-tag-list="name:de,name,int_name" --style-file=.\My_Style\ --generate-sea=multipolygon --family-id=1331 --product-id=1 --series-name=OSM_Germany --family-name=OSM_Germany --area-name=Germany --overview-mapname=OSM_Centraleurope --net --gmapsupp --tdbfile --route --add-pois-to-areas --road-name-pois=0x640a --draw-priority=25 --latin1 --make-opposite-cycleways --remove-short-arcs -c template.args My.typ
pause

This needed only a few GBytes of drive space. A drawback is, that it took much more time (about 17 hours on my computer compared to an approximate "overnight job" before). Can I somehow use the second core of the CPU also for Osmosis? The resulting gmapsupp.img seemed to be ok, as a first test with my garmin indicated.

What I don't understand is: Both gmapsupp.img-files have the same length, but are not equal on a binary level.

Offline

Board footer

Powered by FluxBB