> Date: Thu, 26 Jan 2012 22:42:36 +0100 > From: [email protected] > To: [email protected] > Subject: Re: [mkgmap-dev] mkgmap r2179: Still NullPointerException in > BoundaryUtil > > I have checked the Way.clockwise() method and I think it's completely > correct. I doubt that it is possible to create an overflow with normal > map data. Correct. There is no problem with overflow. The problem is in the routine Java2DConverter.areaToShapes(). ... int lat = Math.round(res[1]); int lon = Math.round(res[0]); ... In special cases, this rounding can change a clockwise way to an counter-clockwise way or vice versa. > > Also the 4 points example should be completely correct if the points are > given as longitude/latitude. In this case it is counterclockwise. > [2412980/371559, 2412981/371558, 2412992/371544, 2412980/371559] Sorry, the points are given as lat/lon pairs, but that doesn't matter, you are right, the way with these (rounded) values is counter-clockwise. The non-rounded values are different and describe a way that is clockwise. > > The misinterpretation is caused by errornously assigning longitude to > the x axis but it is the y axis. I know that I tend to misinterpret the names (my patch used height for latitude values and width for longitude values :-( , but the result doesn't depend on the interpretation. Gerd
_______________________________________________ mkgmap-dev mailing list [email protected] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
