logo separator

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

From WanMil wmgcnfg at web.de on Mon Jan 16 21:40:58 GMT 2012

>  > >
>  > > >
>  > > > > 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).

WanMil



More information about the mkgmap-dev mailing list