logo separator

[mkgmap-dev] [Patch v3] LocationHook with new Quadtree

From Gerd Petermann gpetermann_muenchen at hotmail.com on Thu Jan 12 22:48:38 GMT 2012

Hi WanMil,


> Date: Thu, 12 Jan 2012 23:23:54 +0100
> From: wmgcnfg at web.de
> To: mkgmap-dev at 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 at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20120112/01bf95c0/attachment.html 


More information about the mkgmap-dev mailing list