logo separator

[mkgmap-dev] Short Arc Problem? Error 3 Mapsource, Problem on Calculating this route Basecamp.

From WanMil wmgcnfg at web.de on Sat Jan 5 21:32:54 GMT 2013

> Hi WanMil,
>
>  >
>  > I just commited it because the error was too obvious for me...
>  >
>  > Do you want to have the printout in the StyledConverter when a road has
>  > zero nodes? I didn't commit it because it was not part of the problem
>  > and I wasn't sure if that's only a kind of debugging.
>
> In the boundary routimes we often use code like this:
>              Way w = new Way(0, coveredPart);
>              String attr = w.clockwise() ? "o" : "i";
>
> In the past, this did not create a copy of the points, now it does.
> Will that have an impact on performance? If yes, maybe it would be
> better to
> place a
> static public boolan clockwise(List<Coord>)  method into e.g.
> Java2DConverter ?
>
> Gerd
>

Obviously the patch I commited will perform quite a lot of more list 
copies. Anyhow I don't know how big the perfomance impact is. It would 
be good if anyone could compare runtimes of r2431 and r2435 to see if 
there is some optimization neccessary.

No matter if there is a performance degration it would be good to have a 
method clockwise(List<Coord>) because creating a Way object to check 
that is also a workaround.
I think Java2DConverter is not the best class for that because there is 
no direct relation between the clockwise test and the conversion to 
java.awt.* objects. I would prefer either the Utils class, the Way class 
or a new OsmUtils class.

WanMil



More information about the mkgmap-dev mailing list