logo separator

[mkgmap-dev] HGT - getElevation()

From Andrzej Popowski popej at poczta.onet.pl on Tue Jan 16 21:30:21 GMT 2018

Hi Gerd,

I have done 2 kind of tests, both with mkgmap patched with your patch 
for aligned HGT.

Fist test is more or less the same what you propose. I looked for a 
round peak on a map and then searched for the highest value of DEM on a 
peak, moving cursor around. With zoom 20m, I tried to estimate area, 
where DEM is the highest and then I noted coordinates of the center of 
this area.

Then I loaded original HGT into QGIS and looked for the coordinates and 
position inside HGT pixel, which is displayed by QGIS as a square. I got 
very good match, coordinates were near the center of the pixel and 
height was the same as in Mapsource.

In second test I calculated manually areas.list with 2 tiles for 
splitter. One tile aligned with HGT raster, second with left and top 
edge moved by about half of HGT pixel size. I had to tweak these tiles a 
bit and the final result was this:

29000000: 2291022,918087 to 2297546,946049
#       : aligned

29000001: 2291022,918097 to 2297534,946049
#	: non-aligned

After compiling these tiles, I got 2 maps with following coordinates:

N: 49.299989, S: 49.159999, W: 19.700010, E: 20.300009
DEM layers: 1, N: 49.300010, W: 19.700010

N: 49.299731, S: 49.159999, W: 19.700224, E: 20.300009
DEM layers: 1, N: 49.300010, W: 19.700010

As you can see, DEM position was the same, but map position was a bit 
different in both tiles. Then I saved both tiles on virtual drive, where 
they could be seen by BaseCamp as independent maps. I could switch 
between tiles and compare shading. I uploaded screenshots.

I think about 2 more ways of testing. Frank in his manual about DEM, 
described a clever way to sample DEM values from Mapsource. His tools 
could be used to validate DEM conversion.

Another way could be to artificially move DEM area by multiple of HGT 
pixel size. This would create a DEM with bigger offset but with the same 
heights taken from interpolation. If the look of the map wouldn't 
change, then we could assume, that programs can deal with offset correctly.

-- 
Best regards,
Andrzej


More information about the mkgmap-dev mailing list