logo separator

[mkgmap-dev] Error building DEM map

From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed Feb 28 07:13:03 GMT 2018

Hi Carlos,

I've tried with 3'' files and got this
SCHWERWIEGEND (MapFailedException): split\63240001.osm.pbf: (thrown in BufferedImgFileWriter.ensureSize()) There is not enough room in a single garmin map for all the input data. The .osm file should be split into smaller pieces first.
SCHWERWIEGEND (MapBuilder): split\63240001.osm.pbf: exception while creating DEM file There is not enough room in a single garmin map for all the input data. The .osm file should be split into smaller pieces first.
SCHWERWIEGEND (MapFailedException): split\63240001.osm.pbf: (thrown in MapBuilder.makeMap()) DEM

I think the reason is that you use --block-size=2048. Please remove the option so that mkgmap can calculate the best value.
The traceback shows that the crash happens while mkgmap calculates DEM for the overview map.
I wonder why it has an effect when you split the tiles. This should not happen.
I cannot reproduce this problem so far.
Maybe you have a special *.poly file? I used http://download.geofabrik.de/africa/algeria.poly
Please post your file and the original areas.list produced by splitter.

Besides that I can reproduce the performance problems, you should either limit the number of parallel jobs with the max-jobs value 
or provide more heap with -Xmx option or reduce splitter option max-nodes so that you don't create such large DEM files.


Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Carlos Dávila <cdavilam at orangecorreo.es>
Gesendet: Dienstag, 27. Februar 2018 23:06:00
An: Development list for mkgmap
Betreff: [mkgmap-dev] Error building DEM map

I'm facing an error compiling Algeria map with DEM, using SRTM1 hgt
files. In a first run I use splitter as follows: java -Xmx6G -jar
splitter.jar --max-nodes=2000000
--geonames-file=geonames/cities15000_$ABR.zip --mapid=551${FID}001
--output=o5m algeria.o5m
It gives 5 tiles and when I run mkgmap on them [1], it takes a very long
time and finally it fails with "Number of MapFailedExceptions: 1" and a
huge (+7GB) log file I could not read.
I have manually split problematic tile to a half its original size and
then both resulting tiles fail to compile. After dividing them /2, 3 of
the 4 tiles fail, but then mkgmap gives the following error:
Exception in thread "main" java.lang.NegativeArraySizeException
         at uk.me.parabola.imgfmt.app.dem.DEMFile.calc(DEMFile.java:76)
         at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:679)
         at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:143)
         at uk.me.parabola.mkgmap.main.Main.main(Main.java:114)
And log contains over 10⁷ lines like this: WARNING (HGTConverter):
55129161.o5m: height interpolation returns void at 30.837045,2.094557
After 2 more /2 divisions I could build all tiles.
The smallest failing tile can be downloaded from

[1] java -Xmx4500m -ea -Dlog.config=logging.properties -jar mkgmap.jar
--block-size=2048 --dem=hgt/VIEW1,hgt/SRTM1,hgt/EU-DEM,hgt/VIEW3,hgt
--dem-poly=polygons/$pais.poly --dem-dists=3312,6624,9936,13248,26512
--overview-dem-dist=128000 --output-dir=./tmp --gmapi --show-profiles=1
--bounds=bounds.zip --precomp-sea=sea.zip --max-jobs --route --latin1
--code-page=1252 --country-name=$PAIS --country-abbr=$ABR
--area-name=$MAPA --family-name="OSM $MAPA DEM" --family-id=5$FID
--product-id=1 --product-version=$VERSION --series-name="OSM-$MAPA-DEM"
--overview-mapname=$ABR-5$FID --overview-mapnumber=555${FID}000
--name-tag-list=$NAMETAG --index --process-destination --process-exits
--housenumbers --reduce-point-density=4 --polygon-size-limits="24:12,
18:10, 16:0" --add-pois-to-areas --link-pois-to-ways
--location-autofill=is_in,nearest --drive-on=detect,$DRIVEON
--check-roundabouts --check-roundabout-flares
--license-file=license_OSM_${HGT} --copyright-file=copyright $LANGUAGE
--style=mio --remove-ovm-work-files=true -c ${pais}-DEM.args

mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk

More information about the mkgmap-dev mailing list