logo separator

[mkgmap-dev] Please help with news about new DEM options

From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed Jan 31 11:03:14 GMT 2018

Hi Minko,

I'd also like to know a good rule how to calculate the dem-dists values.

Again the basic formulars:
Typical hgt formats use a raster with either 1200 (3'') or 3600 (1'') points/degree as resolution.
The corresponding resolutions for DEM are 2^32/(1200*360) ~ 9942 or 2^32(3600 * 360) ~ 3314

It is quite obvious that the first value in dem-dists depends on the resolution of the input hgt file(s).
My understanding is that you might use a value near the hgt resolution or maybe
- if you want more precision and map size doesn't matter -
half of it, so
3'' hgt means dem-dist ~ 9942 (or 9942/2 = 4971)
1'' hgt means dem-dist ~ 3314 (or 3314/2 = 1657)
Since mkgmap now rounds these values to multiples of 16 you get
2^32/(1200*360) ~ 9942 -> 9936 rounded
2^32/(1200*360) / 2 ~ 4971 -> 4976 rounded
2^32/(3600*360) ~ 3314 -> 3312 rounded
2^32/(3600*360) / 2 ~ 1657 -> 1664 rounded

These are the values for resolution 24.
What still seems unclear is how you calculate the values for lower resolutions.
Up to now I see no reason to duplicate data with e.g. dem-dists=3312,3312,...
but I see this in Arndts "Speichenkarte" which uses resolution 23 for level 1.

I tried some different values on my Oregon 600 and I think the hill shading is
not very useful on the device. Maybe that's the reason why the setting
Map->Advanced Setup->Shaded relief->Auto
means that hill shading is not used unless you zoom out to 5km?

I also tried with only one or two DEM levels,
e.g. --dem-dists=1664,3312 or just --dem-dists=3312
It works, the device just uses the DEM from the basemap when you zoom out to e.g. 500 m.
The problem: The basemap has a very poor DEM resolution, so it looks wrong when hills
suddenly disappear while zooming out.

My current compromise for high precision with 1'' hgt input and default style:


Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von lig fietser <ligfietser at hotmail.com>
Gesendet: Mittwoch, 31. Januar 2018 09:48
An: mkgmap-dev at lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] Please help with news about new DEM options

Yes, it would be helpful if we mention where we can get the hgt files, a few examples of the dem-dist values and an explanation how to calculate it. This information is already there but mentioned in the many updates  of the branch versions.

I use  http://www.javawa.nl/srtm/index.php?lang=nl because it has a good overview map, the disadvantage is that you need to download every single tile manually and not in one big download. Maybe there are better alternatives?


Gerd wrote:

Hi all,

with r4093 I've merged the dem-tdb branch into trunk. I think it would be good to mention this in the
"Latest news" on [1] , maybe with one or two screen shots, but I have no idea how to write this "from a users view".
Do we need a how-to that describes the sources for hgt files and maybe more about the new options?
It would be great if somebody could help with that.


[1] http://www.mkgmap.org.uk/
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk

More information about the mkgmap-dev mailing list