logo separator

[mkgmap-dev] MDR 9 & 10 groups

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Mon Apr 15 17:16:03 BST 2019

Hi

While trying to diagnose a indexing problem, I find that a bit code in
imgfmt/app/mdr/MdrUtils.java:getGroupForPoi() troublesome:


...
         * 4-5 Recreation / Entertainment / Attractions
         * 6 Shopping
         * 7 Auto Services
         * 8 Community
         * 9 ?
         *
         */
        public static int getGroupForPoi(int fullType) {
                // We group pois based on their type.  This may not be
the final thoughts on this.
                int type = getTypeFromFullType(fullType);
                int group = 0;
                if (fullType <= 0xf)
                        group = 1;
                else if (type >= 0x2a && type <= 0x30) {
                        group = type - 0x28;
                } else if (type == 0x28) {
                        group = 9;
...

type 0x28 is, according to my device, "Island", but not the one that is
findable under Geographic Points/Water Features, as used by the default
style, which is 0x650c.

So, the first question is, does anyone know why 0x28 was given it's own
group.

The second problem is that the code that builds up the group start
indexes into Mdr10 for Mdr9 assumes that the type ranges of the POI
allocated for a group are in the same order as the groups, so, if you
actually have a POI of type 0x28 then, because it has a lower type but
a higher group than the 0x2a..30 range/groups, mdr9 is wrong.

Unless there is a good reason to have 0x28=group 9, then the simplest
fix is just to remove the lines of code and put in a comment that the
types must be in order.

I'm trying to fix something else in this area so I can include this in
some future patch.

Regards
Ticker



More information about the mkgmap-dev mailing list