DEM file options do not work

Dear All, I am trying to generate a Garmin map containing not only the OSM data and contour lines but also some DEM data to display a hill shading in BaseCamp and on the Garmin device. The general map creation works fine (osm data + contour lines) using the process described on my website (www.maiwolf.de/gps). But so far I fail to use the previously described --dem options. I am using the latest mkgmap release and the following command line: java -Xmx2000M -jar D:[path to mkgmap]mkgmap.jar --dem=C:\hgt --dem-interpolation=auto --dem-dists=3312,3312,3312,13248,26512 --overview-dem-dist=88368 Some example .hgt files are found in the "C:\hgt" folder. Yet nothing happens. No error and no output. So I am wondering if my command line is wrong and if the latest mkgmap version is still having the capability to generate dem data files. I would appreaciate if somebody could describe a successful process in more detail. Regards, Bernard

Hello Bernard, 1) You could start with redirecting error/info output to some logging files and then obviously misspell the HGT folder name. You should get error messages for missing hgt files. Add the following to your command line 1>>"C:\build.log" 2>"C:\mkgmapdebug.log" 2) To enable DEM you must add the option show-profiles=1 3) I had strange troubles with HGT files if they where zipped files within zipped files. So for testing best unzip them and if it works you can experiment with the much smaller zipped archives 4) My settings are show-profiles=1 dem=C:\Garmin\Sources\Dem\Hgt - world.zip dem-dists=9942,9942,9942,13248,44176 overview-dem-dist=88368 A full windows build.cmd example, options-files and log results in the zip You use -Xmx2000M where I suppose your computer has more memory available then 2Gb. But that is up to you of course and I think not related to fail on DEM. Kind Regards, Joris -----Oorspronkelijk bericht----- Van: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> Namens Bernard Mai Verzonden: woensdag 26 augustus 2020 13:05 Aan: mkgmap-dev@lists.mkgmap.org.uk Onderwerp: [mkgmap-dev] DEM file options do not work Dear All, I am trying to generate a Garmin map containing not only the OSM data and contour lines but also some DEM data to display a hill shading in BaseCamp and on the Garmin device. The general map creation works fine (osm data + contour lines) using the process described on my website (www.maiwolf.de/gps). But so far I fail to use the previously described --dem options. I am using the latest mkgmap release and the following command line: java -Xmx2000M -jar D:[path to mkgmap]mkgmap.jar --dem=C:\hgt --dem-interpolation=auto --dem-dists=3312,3312,3312,13248,26512 --overview-dem-dist=88368 Some example .hgt files are found in the "C:\hgt" folder. Yet nothing happens. No error and no output. So I am wondering if my command line is wrong and if the latest mkgmap version is still having the capability to generate dem data files. I would appreaciate if somebody could describe a successful process in more detail. Regards, Bernard _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Bernard, AFAIK the only good solution is to have the DEM data in the tile that contains the road data (NET,NOD). No idea why Garmin doesn't support your approach. Ciao, Gerd ---- Bernard Mai schrieb ---- Dear Joris and Gerd, thanks for your elaborate answers. I think I have figured it out. Main problem was my misunderstanding where to put the dem-options. If I put them correctly into the batch file which I use to generate the elevation .img files I get a nice hillshading in Garmin Basecamp. Still missing is the possibility to generate elevation profiles in Basecamp (using tracks generated in Basecamp) and to see the "height" on any position using the mousepointer. For this I have to puzzle harder or does somebody have any idea? Here I include my working command line as it might be interesting for the community. This results in a collection of .img files containing elevation contour lines and hill shading: java -Xmx2000M -jar [...path to mkgmap ...]\mkgmap.jar --show-profiles=1 --dem=[...path to hgt file folder ...] --dem-interpolation=auto --dem-dists=3312,3312,13248,26512,53024 --style-file=[...path to mkgmap style...] --transparent --draw-priority=20 --family-id=30 --mapname=90300001 [...path to collection of splitted elevation data files ...]\9030*.osm.pbf Regards, Bernard

Hi Gerd Does it mean it is imperative DEM tiles have the same bounding box that tiles containing OSM data? I ask because I have recently tried building DEM img's with no OSM data (empty style) and then combining them with OSM tiles, in the same way I do with contour lines tiles, but MapSource crashes as soon as I click on "Show route profile" button. I would like to be able to reuse DEM tiles, so that it is not necessary to build them each time I update a map. This approach works fine for contour lines, but I didn't succeed for DEM. Regards, Carlos El 29/8/20 a las 7:48, Gerd Petermann escribió:
Hi Bernard, AFAIK the only good solution is to have the DEM data in the tile that contains the road data (NET,NOD). No idea why Garmin doesn't support your approach.
Ciao, Gerd
---- Bernard Mai schrieb ----
Dear Joris and Gerd,
thanks for your elaborate answers.
I think I have figured it out. Main problem was my misunderstanding where to put the dem-options. If I put them correctly into the batch file which I use to generate the elevation .img files I get a nice hillshading in Garmin Basecamp. Still missing is the possibility to generate elevation profiles in Basecamp (using tracks generated in Basecamp) and to see the "height" on any position using the mousepointer. For this I have to puzzle harder or does somebody have any idea?
Here I include my working command line as it might be interesting for the community. This results in a collection of .img files containing elevation contour lines and hill shading:
java -Xmx2000M -jar [...path to mkgmap ...]\mkgmap.jar --show-profiles=1 --dem=[...path to hgt file folder ...] --dem-interpolation=auto --dem-dists=3312,3312,13248,26512,53024 --style-file=[...path to mkgmap style...] --transparent --draw-priority=20 --family-id=30 --mapname=90300001 [...path to collection of splitted elevation data files ...]\9030*.osm.pbf
Regards, Bernard

it's fine as long as you don't use empty maps. Just make a DEM contourlines layer. Not an DEM layer and a contourlines layer. On Sun, 30 Aug 2020 at 16:15, Carlos Dávila <carlos@alternativaslibres.org> wrote:
Hi Gerd Does it mean it is imperative DEM tiles have the same bounding box that tiles containing OSM data? I ask because I have recently tried building DEM img's with no OSM data (empty style) and then combining them with OSM tiles, in the same way I do with contour lines tiles, but MapSource crashes as soon as I click on "Show route profile" button. I would like to be able to reuse DEM tiles, so that it is not necessary to build them each time I update a map. This approach works fine for contour lines, but I didn't succeed for DEM. Regards, Carlos
El 29/8/20 a las 7:48, Gerd Petermann escribió:
Hi Bernard, AFAIK the only good solution is to have the DEM data in the tile that contains the road data (NET,NOD). No idea why Garmin doesn't support your approach.
Ciao, Gerd
---- Bernard Mai schrieb ----
Dear Joris and Gerd,
thanks for your elaborate answers.
I think I have figured it out. Main problem was my misunderstanding where to put the dem-options. If I put them correctly into the batch file which I use to generate the elevation .img files I get a nice hillshading in Garmin Basecamp. Still missing is the possibility to generate elevation profiles in Basecamp (using tracks generated in Basecamp) and to see the "height" on any position using the mousepointer. For this I have to puzzle harder or does somebody have any idea?
Here I include my working command line as it might be interesting for the community. This results in a collection of .img files containing elevation contour lines and hill shading:
java -Xmx2000M -jar [...path to mkgmap ...]\mkgmap.jar --show-profiles=1 --dem=[...path to hgt file folder ...] --dem-interpolation=auto --dem-dists=3312,3312,13248,26512,53024 --style-file=[...path to mkgmap style...] --transparent --draw-priority=20 --family-id=30 --mapname=90300001 [...path to collection of splitted elevation data files ...]\9030*.osm.pbf
Regards, Bernard
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- Felix Hartman - Openmtbmap.org & VeloMap.org

Thanks Felix, I'll try it. I just preferred to have separate DEM/contour lines tiles, but combining them will be OK. El 30/8/20 a las 18:02, Felix Hartmann escribió:
it's fine as long as you don't use empty maps. Just make a DEM contourlines layer. Not an DEM layer and a contourlines layer.
On Sun, 30 Aug 2020 at 16:15, Carlos Dávila <carlos@alternativaslibres.org <mailto:carlos@alternativaslibres.org>> wrote:
Hi Gerd Does it mean it is imperative DEM tiles have the same bounding box that tiles containing OSM data? I ask because I have recently tried building DEM img's with no OSM data (empty style) and then combining them with OSM tiles, in the same way I do with contour lines tiles, but MapSource crashes as soon as I click on "Show route profile" button. I would like to be able to reuse DEM tiles, so that it is not necessary to build them each time I update a map. This approach works fine for contour lines, but I didn't succeed for DEM. Regards, Carlos
El 29/8/20 a las 7:48, Gerd Petermann escribió: > Hi Bernard, > AFAIK the only good solution is to have the DEM data in the tile that > contains the road data (NET,NOD). No idea why Garmin doesn't support > your approach. > > Ciao, Gerd > > > > ---- Bernard Mai schrieb ---- > > Dear Joris and Gerd, > > thanks for your elaborate answers. > > I think I have figured it out. Main problem was my misunderstanding > where to put the dem-options. If I put them correctly into the batch > file which I use to generate the elevation .img files I get a nice > hillshading in Garmin Basecamp. Still missing is the possibility to > generate elevation profiles in Basecamp (using tracks generated in > Basecamp) and to see the "height" on any position using the > mousepointer. For this I have to puzzle harder or does somebody have > any idea? > > Here I include my working command line as it might be interesting for > the community. This results in a collection of .img files containing > elevation contour lines and hill shading: > > java -Xmx2000M -jar [...path to mkgmap ...]\mkgmap.jar > --show-profiles=1 --dem=[...path to hgt file folder ...] > --dem-interpolation=auto --dem-dists=3312,3312,13248,26512,53024 > --style-file=[...path to mkgmap style...] --transparent > --draw-priority=20 --family-id=30 --mapname=90300001 [...path to > collection of splitted elevation data files ...]\9030*.osm.pbf > > > Regards, > Bernard
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- Felix Hartman - Openmtbmap.org & VeloMap.org
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Bernhard, you did not provide any input file for which the DEM data should be added. Cioa, Gerd ---- Bernard Mai schrieb ---- Dear All, I am trying to generate a Garmin map containing not only the OSM data and contour lines but also some DEM data to display a hill shading in BaseCamp and on the Garmin device. The general map creation works fine (osm data + contour lines) using the process described on my website (www.maiwolf.de/gps<http://www.maiwolf.de/gps>). But so far I fail to use the previously described --dem options. I am using the latest mkgmap release and the following command line: java -Xmx2000M -jar D:[path to mkgmap]mkgmap.jar --dem=C:\hgt --dem-interpolation=auto --dem-dists=3312,3312,3312,13248,26512 --overview-dem-dist=88368 Some example .hgt files are found in the "C:\hgt" folder. Yet nothing happens. No error and no output. So I am wondering if my command line is wrong and if the latest mkgmap version is still having the capability to generate dem data files. I would appreaciate if somebody could describe a successful process in more detail. Regards, Bernard _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Dear Gerd, I guess I do not understand completely the context of the necessary batch file. Do you have an example? I generate my maps in several steps (get/cut elevation data using phyghtmap, split using splitter, render to .img files using mkgmap) before I wanted to add some DEM files. Regards, Bernard
participants (5)
-
Bernard Mai
-
Carlos Dávila
-
Felix Hartmann
-
Gerd Petermann
-
Joris Bo