order of subfiles in tdb and hasDem flag

Hi tdb experts, I've noticed that mkgmap writes the sub files (DEM, TRE, NOD,... ) in a different order compared to the Garmin maps . Also, the display tool TdbDisplay expects them in this order and reports wrong file sizes when they are in a different order. Maybe this is related to the fact that mkgmap still writes header version 407 while those Garmin maps show 411, maybe it was always wrong? "AdriaTOPO 2.40" uses this order: LBL,RGN,NET,DEM,TRE "TopoGuide Hungary 2.12c" show this order: LBL,RGN,NET,NOD,DEM,TRE mkgmap always starts with TRE. I assume the order doesn't matter, we just have to make sure that file sizes and the names are written in the same order and TdbDisplay should use the file names to determine the meaning of the size fields. Or maybe the order should be as in the Garmin maps ? Gerd

Hi Gerd
I've noticed that mkgmap writes the sub files (DEM, TRE, NOD,... ) in a different order compared to the Garmin maps .
Garman uses various different orders, we use the same order of sub files (in the .img) as maps available when mkgmap was started, including MetroGuide Europe and maps made with cgpsmapper. That order was RGN, TRE, LBL, NET, NOD. For the TDB file, it makes sense that they should be in the same order as in the .img file. This is the case for both the Garmin maps I looked at. I don't know why we do not do that, we originally wrote them in the same order that we wrote the sub-files, but this was changed when net/nod support was added to the tdb file. I am all for changing our code to write the subfiles in the TDB file in the same order as they occur in the input files. ..Steve

Hi Here is a patch to order the entries in the TDB file the same way as in the .img file. ..Steve

Hi Steve, thanks, the modified source looks much better. Found one small problem in the code that is only used for unit tests, see modified patch. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Steve Ratcliffe <steve@parabola.me.uk> Gesendet: Sonntag, 11. Februar 2018 23:11:10 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] order of subfiles in tdb and hasDem flag Hi Here is a patch to order the entries in the TDB file the same way as in the .img file. ..Steve
participants (3)
-
Gerd Petermann
-
Gerd Petermann
-
Steve Ratcliffe