logo separator

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

From WanMil wmgcnfg at web.de on Sun Jan 6 12:15:52 GMT 2013

>  > 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.
>
> Reg. performance: I did not measure it. In most places that I've changed
> the clockwise() method was just used to determine a file name, so I/O
> performance would be the bottleneck.
> I think the Way class is a good place for it, so I've changed that.
>
> There is now only the PrecompSeaMerger which might show a
> performance degration, but I don't expect measurable changes.
> The area.intersect() methods are copying the ArrayLists much more often,
> so one more copy action should not cause problems.
>
> Gerd
>

Maybe it was not very clear what I meant. The performance degration 
might not be introduced by changing the clockwise method but by always 
creating a new list when instantiating a new Way object, e.g. the 
Java2DConverter creates list of points that are often directly forwarded 
to a new Way object. This list of points is now created twice (once by 
the Java2DConverter and once by the Way object). This is often used in 
the multipolygon code and maybe somewhere else.

WanMil



More information about the mkgmap-dev mailing list