logo separator

[mkgmap-dev] Crash in NodCheck

From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed Jul 8 17:39:20 BST 2020

Hi Steve,

yes, mkgmap already groups the centers by the result of the getGroup() method. With my latest patch it first write those nodes which have no arcs. Nodes in one center are sorted by longitude and latitude, and I also think that Garmin uses this order.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Steve Ratcliffe <steve at parabola.me.uk>
Gesendet: Mittwoch, 8. Juli 2020 18:34
An: mkgmap-dev at lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] Crash in NodCheck


Hi Gerd

 > the current code in NodCheck (NodFile.java) stops reading route nodes
when
 >          if (low == 0 && flags == 0)
 >                  return null;

Yes your right that check is not needed, because we know the correct
size of the section.  I've found a few cases where it is wrong
since  there is only a single spare zero byte at the end of
the center.

 > The code in mkgmap may write route nodes where both values are 0. If
I got that right this happens when the node is (one of) the last nodes
in a route center.

On the other hand I couldn't find any cases in my maps of flags being
0x00.  In fact none with the top nibble as 0.

 > With current mkgmap the nodes in one route center are sorted by
position. NodCheck doesn't seem to verify this so I assume there is no
need for this order.
 > Maybe the nodes in Garmin maps have a different order? For example,
nodes with flags == 0 could come first?

Garmin maps appear to sorted by position - at least by longitude,
although maybe not latitude as mkgmap does.  It is possible that there
is some secondary sort condition that we have not found yet.

 From what I've just found there seems to be some kind of sorting
on destclass.  The first center tends to be all destclass=0 and the
last one destclass=4.

Steve
_______________________________________________
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