logo separator

[mkgmap-dev] Again - java.lang.ArrayIndexOutOfBoundsException: on DEM creation

From Felix Hartmann extremecarver at gmail.com on Fri Apr 13 14:32:06 BST 2018

On compiling contourlines with DEM of Antarctica - I get this error:

java.lang.ArrayIndexOutOfBoundsException: 7
        at
uk.me.parabola.mkgmap.reader.hgt.HGTConverter.prepReader(HGTConverter.java:408)
        at
uk.me.parabola.mkgmap.reader.hgt.HGTConverter.fillArray(HGTConverter.java:269)
        at
uk.me.parabola.mkgmap.reader.hgt.HGTConverter.getElevation(HGTConverter.java:149)
        at
uk.me.parabola.mkgmap.reader.hgt.HGTConverter.getHeights(HGTConverter.java:633)
        at
uk.me.parabola.imgfmt.app.dem.DEMSection.calcTiles(DEMSection.java:139)
        at
uk.me.parabola.imgfmt.app.dem.DEMSection.<init>(DEMSection.java:84)
        at uk.me.parabola.imgfmt.app.dem.DEMFile.calc(DEMFile.java:112)
        at
uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:341)
        at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:107)
        at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:69)
        at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:290)
        at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:286)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException


It happens with:
java -ea -jar -Xmx20000M /home/contourlines/mkgmap.jar
--dem=/home/contourlines/hgt/VIEW1/,/home/contourlines/hgt/SRTM1v3.0/,/home/contourlines/hgt/VIEW3/,/home/contourlines/hgt/SRTM3v3.0/
--dem-dists=5520 --dem-poly=/home/contourlines/bounds/antarctica.poly
--max-jobs=1 --reduce-point-density=3.6 --transparent
--description=openmtbmap-srtm-ANTA-13-Apr-2018 --style-file=srtm --latin1
--draw-priority=24 --mapname=74990000 --family-id=7499 --keep-going
--product-id=1 --series-name=openmtbmap-srtm-ANTA-13-Apr-2018
--family-name=mtbmap-srtm-ANTA-2018 --overview-mapname=mapsetz --tdbfile
74990034.osm.pbf 74990037.osm.pbf 74990038.osm.pbf

I've uploaded the style srtm (though that is largely irrelevant I guess)
and the 3 offending pbf files here: https://openmtbmap.org/broken.zip
Even though I guess to reproduce you also need the hgt files.

I also get this error on a couple of pbf tiles created by splitter and
phyghtmap of Russia (and therefore also on Asia continent).

I'm not sure if the fault is in the pbf or in the hgt - As I don't know
which hgt file would be coressponding here is the command used with
phyghtmap - it will download the relevant hgt files.

phyghtmap --earthexplorer-user=XXXXX  --earthexplorer-password=XXXXX
--jobs=6 --polygon=/home/contourlines/bounds/antarctica.poly --step=20
--no-zero-contour --void-range-max=-420 --output-prefix=anta
--line-cat=500,100 --start-node-id=10000000 --start-way-id=10000000
--source=view1,view3,srtm3,srtm1 --max-nodes-per-way=230
--max-nodes-per-tile=0 --pbf

-- 
Felix Hartman - Openmtbmap.org & VeloMap.org
Schusterbergweg 32/8
6020 Innsbruck
Austria - Österreich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20180413/7bf55ae3/attachment.html>


More information about the mkgmap-dev mailing list