logo separator

[mkgmap-dev] HGT - getElevation()

From Andrzej Popowski popej at poczta.onet.pl on Thu Jan 18 20:09:19 GMT 2018

Hi Gerd,

I have executed your script and looked at maps. I have tested them with 
artificial HGT too. Only the original-unaligned map has DEM at wrong 
position. It is moved by about 0.00033 degree right and down.

I looked at offset calculated as (DEM coordinate)%(dem-dist) and only 
for this map, offset was bigger than half of dem-dist. Any attempt to 
align HGT with data reduce this offset, but it still remain quite big, 
like 1300-3600, while dem-dist is 9942.

My guess is, that Mapsource/BaseCamp calculate DEM pixel positions 
globally, basing on dem-dist. If coordinates of DEM layers aren't 
aligned with with dem-dist and misalignment is too big, than Mapsource 
can fetch wrong DEM values.

-- 
Best regards,
Andrzej


More information about the mkgmap-dev mailing list