logo separator

[mkgmap-dev] [Patch] Improve Locator

From Gerd Petermann gpetermann_muenchen at hotmail.com on Thu Mar 8 09:33:43 GMT 2012

Hi WanMil,


> Date: Wed, 7 Mar 2012 20:10:42 +0100
> From: wmgcnfg at web.de
> To: mkgmap-dev at lists.mkgmap.org.uk
> Subject: Re: [mkgmap-dev] [Patch] Improve Locator
> 
> Hi Gerd,
> 
> I have commited a modified version of b). I don't use a separate HashMap 
> because the isoMap is already there.

okay, I did not want to touch the original map, but I agree that your version is better

> 
> I would also commit the other parts. Please modify the following things:
> * The K-D-Tree class has a test in the main() method. Please move this 
> to a JUnit test
> * Please remove the commented old code

done, see attached patch.

Gerd


> 
> Thanks
> WanMil
> 
> > Hi,
> >
> > attached patch for the performance branch improves the Locator.
> > a) It uses a kd-tree to implement the findNextPoint() method.
> > This may also be usable in other routines, did not look at this until now.
> >
> > The implementation is based on the demo in wikepedia:
> > http://en.wikipedia.org/wiki/K-d_tree wikipedia
> >
> > The method in MapPointFastFindMap is slower and sometimes the
> > kd-tree finds nearer places.
> >
> > b) added memoization to LocatorConfig.getCountryISOCode()
> >
> > http://gis.19327.n5.nabble.com/file/n5531583/locator_v1.patch
> > locator_v1.patch
> >
> > Gerd
> >
> > --
> > View this message in context: http://gis.19327.n5.nabble.com/Patch-Improve-Locator-tp5531583p5531583.html
> > Sent from the Mkgmap Development mailing list archive at Nabble.com.
> > _______________________________________________
> > mkgmap-dev mailing list
> > mkgmap-dev at lists.mkgmap.org.uk
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> 
> _______________________________________________
> 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/20120308/cc2b38b2/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: locator_v2.patch
Type: application/x-download
Size: 10547 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20120308/cc2b38b2/attachment.bin 


More information about the mkgmap-dev mailing list