Error when not using dem-poly

Hi Gerd I'm using latest r4036 I'm applying what you suggested to Minko to avoid contours been given a dem. In my dem.args I have dem=e:\dem\europe\ overview-dem-dist=888888 dem-dists=3312,13248,26512,53024 and get the following error: Number of MapFailedExceptions: 0 Exception in thread "main" java.lang.NullPointerException at uk.me.parabola.mkgmap.reader.hgt.HGTConverter.getElevation(HGTConvert er.java:89) at uk.me.parabola.mkgmap.reader.hgt.HGTConverter.getHeights(HGTConverter .java:287) at uk.me.parabola.imgfmt.app.dem.DEMSection.calcTiles(DEMSection.java:10 5) at uk.me.parabola.imgfmt.app.dem.DEMSection.<init>(DEMSection.java:78) at uk.me.parabola.imgfmt.app.dem.DEMFile.calc(DEMFile.java:60) at uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:340) at uk.me.parabola.mkgmap.combiners.OverviewBuilder.writeOverviewMap(Over viewBuilder.java:191) at uk.me.parabola.mkgmap.combiners.OverviewBuilder.onFinish(OverviewBuil der.java:103) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:617) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.ja va:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:136) at uk.me.parabola.mkgmap.main.Main.main(Main.java:107) 1) When I add dem-poly=areas.poly the error disappears. 2) I also don't get the error if I replace -c dem-args with --dem=e:\dem\europe\ --overview-dem-dist=888888 --dem-dists=3312,13248,26512,53024 3) This only seems to affect certain pbfs. file: http://files.mkgmap.org.uk/download/385/12345678.osm.pbf r Nick -- Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html

Hi Nick, thanks for reporting. I'll try to reproduce the problem. Please note that overview-dem-dist=888888 is probably too large, 88888 would be a "normal" value. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von nwillink <osm@pinns.co.uk> Gesendet: Montag, 8. Januar 2018 11:01:46 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: [mkgmap-dev] Error when not using dem-poly Hi Gerd I'm using latest r4036 I'm applying what you suggested to Minko to avoid contours been given a dem. In my dem.args I have dem=e:\dem\europe\ overview-dem-dist=888888 dem-dists=3312,13248,26512,53024 and get the following error: Number of MapFailedExceptions: 0 Exception in thread "main" java.lang.NullPointerException at uk.me.parabola.mkgmap.reader.hgt.HGTConverter.getElevation(HGTConvert er.java:89) at uk.me.parabola.mkgmap.reader.hgt.HGTConverter.getHeights(HGTConverter .java:287) at uk.me.parabola.imgfmt.app.dem.DEMSection.calcTiles(DEMSection.java:10 5) at uk.me.parabola.imgfmt.app.dem.DEMSection.<init>(DEMSection.java:78) at uk.me.parabola.imgfmt.app.dem.DEMFile.calc(DEMFile.java:60) at uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:340) at uk.me.parabola.mkgmap.combiners.OverviewBuilder.writeOverviewMap(Over viewBuilder.java:191) at uk.me.parabola.mkgmap.combiners.OverviewBuilder.onFinish(OverviewBuil der.java:103) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:617) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.ja va:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:136) at uk.me.parabola.mkgmap.main.Main.main(Main.java:107) 1) When I add dem-poly=areas.poly the error disappears. 2) I also don't get the error if I replace -c dem-args with --dem=e:\dem\europe\ --overview-dem-dist=888888 --dem-dists=3312,13248,26512,53024 3) This only seems to affect certain pbfs. file: http://files.mkgmap.org.uk/download/385/12345678.osm.pbf r Nick -- Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Thanks Gerd On 08/01/2018 10:21, Gerd Petermann wrote:
Hi Nick,
thanks for reporting. I'll try to reproduce the problem. Please note that overview-dem-dist=888888 is probably too large, 88888 would be a "normal" value.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von nwillink <osm@pinns.co.uk> Gesendet: Montag, 8. Januar 2018 11:01:46 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: [mkgmap-dev] Error when not using dem-poly
Hi Gerd
I'm using latest r4036
I'm applying what you suggested to Minko to avoid contours been given a dem.
In my dem.args I have
dem=e:\dem\europe\ overview-dem-dist=888888 dem-dists=3312,13248,26512,53024
and get the following error:
Number of MapFailedExceptions: 0 Exception in thread "main" java.lang.NullPointerException at uk.me.parabola.mkgmap.reader.hgt.HGTConverter.getElevation(HGTConvert er.java:89) at uk.me.parabola.mkgmap.reader.hgt.HGTConverter.getHeights(HGTConverter .java:287) at uk.me.parabola.imgfmt.app.dem.DEMSection.calcTiles(DEMSection.java:10 5) at uk.me.parabola.imgfmt.app.dem.DEMSection.<init>(DEMSection.java:78) at uk.me.parabola.imgfmt.app.dem.DEMFile.calc(DEMFile.java:60) at uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:340) at uk.me.parabola.mkgmap.combiners.OverviewBuilder.writeOverviewMap(Over viewBuilder.java:191) at uk.me.parabola.mkgmap.combiners.OverviewBuilder.onFinish(OverviewBuil der.java:103) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:617) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.ja va:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:136) at uk.me.parabola.mkgmap.main.Main.main(Main.java:107)
1) When I add dem-poly=areas.poly the error disappears.
2) I also don't get the error if I replace -c dem-args with --dem=e:\dem\europe\ --overview-dem-dist=888888 --dem-dists=3312,13248,26512,53024
3) This only seems to affect certain pbfs.
file: http://files.mkgmap.org.uk/download/385/12345678.osm.pbf
r Nick
-- Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Nck, I was not able to reproduce the problem with that file, but I think I fixed the problem with r4037: http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4037 Please try it. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von osm@pinns <osm@pinns.co.uk> Gesendet: Montag, 8. Januar 2018 11:28:00 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] Error when not using dem-poly Thanks Gerd On 08/01/2018 10:21, Gerd Petermann wrote:
Hi Nick,
thanks for reporting. I'll try to reproduce the problem. Please note that overview-dem-dist=888888 is probably too large, 88888 would be a "normal" value.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von nwillink <osm@pinns.co.uk> Gesendet: Montag, 8. Januar 2018 11:01:46 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: [mkgmap-dev] Error when not using dem-poly
Hi Gerd
I'm using latest r4036
I'm applying what you suggested to Minko to avoid contours been given a dem.
In my dem.args I have
dem=e:\dem\europe\ overview-dem-dist=888888 dem-dists=3312,13248,26512,53024
and get the following error:
Number of MapFailedExceptions: 0 Exception in thread "main" java.lang.NullPointerException at uk.me.parabola.mkgmap.reader.hgt.HGTConverter.getElevation(HGTConvert er.java:89) at uk.me.parabola.mkgmap.reader.hgt.HGTConverter.getHeights(HGTConverter .java:287) at uk.me.parabola.imgfmt.app.dem.DEMSection.calcTiles(DEMSection.java:10 5) at uk.me.parabola.imgfmt.app.dem.DEMSection.<init>(DEMSection.java:78) at uk.me.parabola.imgfmt.app.dem.DEMFile.calc(DEMFile.java:60) at uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:340) at uk.me.parabola.mkgmap.combiners.OverviewBuilder.writeOverviewMap(Over viewBuilder.java:191) at uk.me.parabola.mkgmap.combiners.OverviewBuilder.onFinish(OverviewBuil der.java:103) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:617) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.ja va:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:136) at uk.me.parabola.mkgmap.main.Main.main(Main.java:107)
1) When I add dem-poly=areas.poly the error disappears.
2) I also don't get the error if I replace -c dem-args with --dem=e:\dem\europe\ --overview-dem-dist=888888 --dem-dists=3312,13248,26512,53024
3) This only seems to affect certain pbfs.
file: http://files.mkgmap.org.uk/download/385/12345678.osm.pbf
r Nick
-- Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, Whatever you did, it seems to work! ;Many thanks will do some more testing r Nick On 08/01/2018 10:51, Gerd Petermann wrote:
Hi Nck,
I was not able to reproduce the problem with that file, but I think I fixed the problem with r4037: http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4037
Please try it.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von osm@pinns <osm@pinns.co.uk> Gesendet: Montag, 8. Januar 2018 11:28:00 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] Error when not using dem-poly
Thanks Gerd
On 08/01/2018 10:21, Gerd Petermann wrote:
Hi Nick,
thanks for reporting. I'll try to reproduce the problem. Please note that overview-dem-dist=888888 is probably too large, 88888 would be a "normal" value.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von nwillink <osm@pinns.co.uk> Gesendet: Montag, 8. Januar 2018 11:01:46 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: [mkgmap-dev] Error when not using dem-poly
Hi Gerd
I'm using latest r4036
I'm applying what you suggested to Minko to avoid contours been given a dem.
In my dem.args I have
dem=e:\dem\europe\ overview-dem-dist=888888 dem-dists=3312,13248,26512,53024
and get the following error:
Number of MapFailedExceptions: 0 Exception in thread "main" java.lang.NullPointerException at uk.me.parabola.mkgmap.reader.hgt.HGTConverter.getElevation(HGTConvert er.java:89) at uk.me.parabola.mkgmap.reader.hgt.HGTConverter.getHeights(HGTConverter .java:287) at uk.me.parabola.imgfmt.app.dem.DEMSection.calcTiles(DEMSection.java:10 5) at uk.me.parabola.imgfmt.app.dem.DEMSection.<init>(DEMSection.java:78) at uk.me.parabola.imgfmt.app.dem.DEMFile.calc(DEMFile.java:60) at uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:340) at uk.me.parabola.mkgmap.combiners.OverviewBuilder.writeOverviewMap(Over viewBuilder.java:191) at uk.me.parabola.mkgmap.combiners.OverviewBuilder.onFinish(OverviewBuil der.java:103) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:617) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.ja va:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:136) at uk.me.parabola.mkgmap.main.Main.main(Main.java:107)
1) When I add dem-poly=areas.poly the error disappears.
2) I also don't get the error if I replace -c dem-args with --dem=e:\dem\europe\ --overview-dem-dist=888888 --dem-dists=3312,13248,26512,53024
3) This only seems to affect certain pbfs.
file: http://files.mkgmap.org.uk/download/385/12345678.osm.pbf
r Nick
-- Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, one general question: Do you see any advantage in using 'rounded' binary values or doesn't it matter at all? Henning On 08.01.2018 18:21, Gerd Petermann wrote:
Hi Nick,
thanks for reporting. I'll try to reproduce the problem. Please note that overview-dem-dist=888888 is probably too large, 88888 would be a "normal" value.
Gerd

Hi Henning, no idea what that means. Where would you use these values? The data in hgt files is stored as 16 bit signed integer value in metres. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Henning Scholland <osm@hscholland.de> Gesendet: Montag, 8. Januar 2018 12:56:18 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] Error when not using dem-poly Hi Gerd, one general question: Do you see any advantage in using 'rounded' binary values or doesn't it matter at all? Henning On 08.01.2018 18:21, Gerd Petermann wrote:
Hi Nick,
thanks for reporting. I'll try to reproduce the problem. Please note that overview-dem-dist=888888 is probably too large, 88888 would be a "normal" value.
Gerd
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, I was thinking about the distance-values for DEM. Henning On 08.01.2018 20:35, Gerd Petermann wrote:
Hi Henning,
no idea what that means. Where would you use these values? The data in hgt files is stored as 16 bit signed integer value in metres.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Henning Scholland <osm@hscholland.de> Gesendet: Montag, 8. Januar 2018 12:56:18 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] Error when not using dem-poly
Hi Gerd, one general question: Do you see any advantage in using 'rounded' binary values or doesn't it matter at all? Henning
On 08.01.2018 18:21, Gerd Petermann wrote:
Hi Nick,
thanks for reporting. I'll try to reproduce the problem. Please note that overview-dem-dist=888888 is probably too large, 88888 would be a "normal" value.
Gerd
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Henning, Do you think that a certain value would allow faster processing of zipped files? Well, we probably always have to unzip most of the file, but with a clever algorithm we may be able to store only needed values. For dem-dists below 10000 this is probably nearly every value, for much higher values it might be possible to omit some. This gets more complicated when you take into account that img tiles don't fully overlap hgt bounds and even more complex with --dem-poly. I think the code would be quite complex and I don't expect much improvement reg. heap memory. Before coding that I'd prefer to extract zip files into a temp file directory and use the MappedByteBuffer class as with normal hgt files. This seems to manage memory very well for our purpose, at least with Oracles JRE. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Henning Scholland <osm@hscholland.de> Gesendet: Montag, 8. Januar 2018 13:36:46 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] Error when not using dem-poly Hi Gerd, I was thinking about the distance-values for DEM. Henning On 08.01.2018 20:35, Gerd Petermann wrote:
Hi Henning,
no idea what that means. Where would you use these values? The data in hgt files is stored as 16 bit signed integer value in metres.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Henning Scholland <osm@hscholland.de> Gesendet: Montag, 8. Januar 2018 12:56:18 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] Error when not using dem-poly
Hi Gerd, one general question: Do you see any advantage in using 'rounded' binary values or doesn't it matter at all? Henning
On 08.01.2018 18:21, Gerd Petermann wrote:
Hi Nick,
thanks for reporting. I'll try to reproduce the problem. Please note that overview-dem-dist=888888 is probably too large, 88888 would be a "normal" value.
Gerd
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Basically my idea was, if I always double the zoom-level (dist = 4000, 8000, ...) then I just need to calculate the highest resolution and all others can be produced by just throwing out every 2nd value. It's not related to zipped input. It would be faster I think, but definitely less flexible. So I'm not sure, if it's worth thinking about it. Henning On 08.01.2018 20:59, Gerd Petermann wrote:
Hi Henning,
Do you think that a certain value would allow faster processing of zipped files? Well, we probably always have to unzip most of the file, but with a clever algorithm we may be able to store only needed values. For dem-dists below 10000 this is probably nearly every value, for much higher values it might be possible to omit some. This gets more complicated when you take into account that img tiles don't fully overlap hgt bounds and even more complex with --dem-poly. I think the code would be quite complex and I don't expect much improvement reg. heap memory.
Before coding that I'd prefer to extract zip files into a temp file directory and use the MappedByteBuffer class as with normal hgt files. This seems to manage memory very well for our purpose, at least with Oracles JRE.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Henning Scholland <osm@hscholland.de> Gesendet: Montag, 8. Januar 2018 13:36:46 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] Error when not using dem-poly
Hi Gerd, I was thinking about the distance-values for DEM.
Henning
On 08.01.2018 20:35, Gerd Petermann wrote:
Hi Henning,
no idea what that means. Where would you use these values? The data in hgt files is stored as 16 bit signed integer value in metres.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Henning Scholland <osm@hscholland.de> Gesendet: Montag, 8. Januar 2018 12:56:18 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] Error when not using dem-poly
Hi Gerd, one general question: Do you see any advantage in using 'rounded' binary values or doesn't it matter at all? Henning
On 08.01.2018 18:21, Gerd Petermann wrote:
Hi Nick,
thanks for reporting. I'll try to reproduce the problem. Please note that overview-dem-dist=888888 is probably too large, 88888 would be a "normal" value.
Gerd
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (4)
-
Gerd Petermann
-
Henning Scholland
-
nwillink
-
osm@pinns