logo separator

[mkgmap-dev] Patch: use all 4 bytes of POIGlobalFlags in LBL Header

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Sat Feb 12 16:54:55 GMT 2022

Hi Gerd

An interpretation of the comment is that POIGlobalFlags data is 16
bits, and, if bit 9 is set, the next byte is the number of extra word
of POI information immediately following. The data then continues with
2 bytes unknown, POITypeIndex Position/Size/ItemSize...

As mkgmap always writes zero to the byte that would hold bit 9, the
extra byte/words won't happen and so the patch won't change any
behaviour.

However, it seems more useful to change the code as the comment
suggests, with a get2u/put2u of flags and get2u/put2u zero/ignore,
adjust the comment and, on read, assert bit 9 not set.

It does seem very unlikely there would be a variable length structure
in a header!

Ticker

On Sat, 2022-02-12 at 15:21 +0000, Gerd Petermann wrote:
> Hi Ticker,
> 
> I don't understand. The number of bytes doesn't change, the
> patch just places more information in the flags field instead of
> ignoring them.
> I am not aware of any code in mkgmap that reads or fills those
> bits,yet.
> 
> Gerd
> 
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag
> von Ticker Berkin <rwb-mkgmap at jagit.co.uk>
> Gesendet: Samstag, 12. Februar 2022 15:19
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Patch: use all 4 bytes of POIGlobalFlags in
> LBL Header
> 
> Hi Gerd
> 
> Reading it more carefully, probably the basic flag set is 16 bits,
> with
> 0x0100 indicating more bytes to read/write
> 
> Ticker
> 
> 
> On Sat, 2022-02-12 at 12:36 +0000, Ticker Berkin wrote:
> > Hi Gerd
> > 
> > Although the comment might have inaccuracies and be ambiguous, it
> > contains useful information about how the extra flags for POI might
> > be
> > represented, which could be different from just reading 4 bytes.
> > 
> > One way of interpret it is if (first byte & 0x80), then read/write
> > extra bytes; the 3 zero/unknown bytes not being part of this flag
> > set.
> > 
> > Ticker
> > 
> > 
> > On Fri, 2022-02-11 at 15:33 +0000, Gerd Petermann wrote:
> > > And now with the patch ...
> > > 
> > > Gerd
> > > 
> > > ________________________________________
> > > Von: Gerd Petermann
> > > Gesendet: Freitag, 11. Februar 2022 16:32
> > > An: mkgmap-dev at lists.mkgmap.org.uk
> > > Betreff: Patch: use all 4 bytes of POIGlobalFlags in LBL Header
> > > 
> > > Hi devs,
> > > 
> > > attached patch simplifies the code, but should not change
> > > anything
> > > in
> > > the output of mkgmap.
> > > 
> > > GPXSee contains code to evaluate some of the bits which were
> > > ignored
> > > so far.
> > > 
> > > Do you see any problems?
> > > 
> > > Gerd
> > > _______________________________________________
> > > mkgmap-dev mailing list
> > > mkgmap-dev at lists.mkgmap.org.uk
> > > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> > 
> > 
> > _______________________________________________
> > mkgmap-dev mailing list
> > mkgmap-dev at lists.mkgmap.org.uk
> > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> 
> 
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev




More information about the mkgmap-dev mailing list