And now with the patch ... Gerd
________________________________________ Von: Gerd Petermann Gesendet: Freitag, 11. Februar 2022 16:32 An: mkgmap-dev@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
Index: src/uk/me/parabola/imgfmt/app/lbl/PlacesHeader.java =================================================================== --- src/uk/me/parabola/imgfmt/app/lbl/PlacesHeader.java (revision 4896) +++ src/uk/me/parabola/imgfmt/app/lbl/PlacesHeader.java (working copy) @@ -49,7 +49,7 @@ private final Section highway = new Section(zip, HIGHWAY_REC_LEN); private final Section exitFacility = new Section(highway, EXIT_REC_LEN); private final Section highwayData = new Section(exitFacility, HIGHWAYDATA_REC_LEN); - private int POIGlobalFlags ; + private int POIGlobalFlags; void setPOIGlobalFlags(int flags) { this.POIGlobalFlags = flags; @@ -84,16 +84,7 @@ writer.put4(poiProperties.getSize()); writer.put1u(0); // offset multiplier - // mb 5/9/2009 - discovered that Garmin maps can contain more - // than 8 bits of POI global flags - have seen the 9th bit set - // to indicate the presence of some extra POI info (purpose - // unknown but it starts with a byte that contains the number - // of further bytes to read << 1) - therefore, this group - // should probably be: 16 bits of POI global flags followed by - // 16 zero bits rather than 8 bits of flags and 24 zero bits - writer.put1u(POIGlobalFlags); // properties global mask - writer.put2u(0); - writer.put1u(0); + writer.put4(POIGlobalFlags); // properties global mask writer.put4(poiTypeIndex.getPosition()); writer.put4(poiTypeIndex.getSize()); @@ -135,9 +126,7 @@ poiProperties.readSectionInfo(reader, false); reader.get(); // offset multiplier - POIGlobalFlags = reader.get1u(); - reader.get2u(); - reader.get(); + POIGlobalFlags = reader.get4(); poiTypeIndex.readSectionInfo(reader, true, true);
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev