logo separator

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

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

Hi Gerd,

>  > 3. I expect that most streets do not end exactly at a city border but
>  > lots will end some meters after it. Cutting them will increase the
>  > number of objects much and we will have a lot of short streets. So maybe
>  > an overlapping threshold is required for the decision not to split a
> line.
>
> Okay, since I am not yet familiar with the part of the program that uses
> the location info,
> I'll leave that for now.

I don't want you hold off from changing that and playing around a bit. I 
only want to list up things that come into my mind that have to be 
solved so you can be aware of that :-)

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

WanMil


>
> Ciao,
> Gerd
>



More information about the mkgmap-dev mailing list