
Hi WanMil,
Date: Thu, 12 Jan 2012 23:23:54 +0100 From: wmgcnfg@web.de To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] [Patch v3] LocationHook with new Quadtree
* LocationHook.mkgmapTagsArray starts with an empty string element. I don't like that.
Yes, looks strange, but without it the level value would not match the position in the array. I'll add a comment for this, okay?
I also want to avoid calling getTag with an empty key, so I think we need for (int i=1;i < ...)
Every time I see an for (int i=1; i< ... my first impression is: Oh, this is wrong... So if the only reason is that otherwise the adminlevel does match then it sounds better to use adminlevel-1.
Indeed this was the reason why I kept the from-12-downto-1 loop. Nobody thinks this is a typo ;-) Anyway, I agree that it is best to remove the empty string from the array, start the loops with 0 and use xyz[admLevel-1]
Also note that admin_level=1 is not used in OSM. So you can remove that either.
Ok, I did not know this. Anyway, admLevel-2 is a bit too confusing in my eyes. By the way: I thought very long about the idea of the HashTable mkgmapTags in the trunk version. I guess it was used to allow easy removing of selected admin_levels or postal_code from processing ? Ciao, Gerd
WanMil _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev