logo separator

[mkgmap-dev] option --show-profiles and DEM

From Gerd Petermann gpetermann_muenchen at hotmail.com on Fri Jan 12 12:17:04 GMT 2018

Hi Andrzej,

thanks for the hint. I'll try to code that in DemDisplay today.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej at poczta.onet.pl>
Gesendet: Freitag, 12. Januar 2018 13:10:32
An: mkgmap-dev at lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] option --show-profiles and DEM

Hi Nick,

DEM in GMP should be the same. The difference is, that in DEM subfile
headers starts at 0, but in GMP header is at address contained at offset
0x2D. If you want to analyze DEM then algorithm is something like that:

char *subfile
int  offset;

if (typ == DEM)
        offset = 0
if (typ == GMP)
        offset = *(int *)(subfile + 0x2D);

HEADER_DEM *header = (HEADER_DEM *)(subfile + offset)

And then you can access DEM data basing on header content. Pointers in
header are correct regardless of header position inside subfile, they
are always relative to beginning of subfile.

--
Best regards,
Andrzej

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list