logo separator

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

From Gerd Petermann gpetermann_muenchen at hotmail.com on Mon Jan 16 21:47:54 GMT 2012

Hi WanMil,


> Date: Mon, 16 Jan 2012 22:40:58 +0100
> From: wmgcnfg at web.de
> To: mkgmap-dev at lists.mkgmap.org.uk
> Subject: Re: [mkgmap-dev] [Patch v3] LocationHook with new Quadtree
> 
> >  > >
> >  > > >
> >  > > > > The remaining differences should be errors caused by the
> > "insideness"
> >  > > > > problem of contains().
> >  > > >
> >  > > > Problems with the bounding box of the quadtree should be solved by
> >  > > > adding +1 to maxlat/maxlong of the java area object.
> >  > >
> >  > > Hmm, does that mean you want to shift the whole area or only selected
> >  > > points? Which ones?
> >  > > I thought about using the Area.transform() method to blow up the area a
> >  > > little bit, but did not yet find
> >  > > something useful. I think searching the shifted point is easy to
> >  > > implement and this double (or multiple)
> >  > > search will not happen very often.
> >  >
> >  > I think it's much easier:
> >  > In the constructor of BoundaryQuadTree.Node use the following line:
> >  > this.bbox = new Rectangle(bbox.getMinLong(), bbox.getMinLat(),
> >  > bbox.getMaxLong() - bbox.getMinLong() + 1, bbox.getMaxLat()
> >  > - bbox.getMinLat() + 1);
> >  >
> >  > So just increase the width and height of the (java.awt.geom.Area)
> >  > bounding box by 1. That should do it(?).
> > I don't think so. The area keeps it's own internal bbox in field
> > cachedBounds,
> > and that is tested first when contains() is called .
> 
> I am only talking about the java.awt.geom.Area bbox in the Node class. I 
> am not talking about the area objects of each boundary because you were 
> initially talking about the bounding box of the quadtree (which is a 
> rectangle).

In fact, the problem occures also with the java.awt.geom.Area.contains(co.getLongitude(), co.getLatitude())  

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/20120116/ff4c35e3/attachment.html 


More information about the mkgmap-dev mailing list