[mapserver-commits] r12757 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Mon Nov 7 07:31:29 EST 2011
Author: tbonfort
Date: 2011-11-07 04:31:29 -0800 (Mon, 07 Nov 2011)
New Revision: 12757
Modified:
trunk/mapserver/mapprimitive.c
Log:
fix angle follow erroneous rejects for maxoverlap
Modified: trunk/mapserver/mapprimitive.c
===================================================================
--- trunk/mapserver/mapprimitive.c 2011-11-07 11:14:16 UTC (rev 12756)
+++ trunk/mapserver/mapprimitive.c 2011-11-07 12:31:29 UTC (rev 12757)
@@ -2059,7 +2059,7 @@
/* Average the points and calculate each angle */
for (k = 1; k <= labelpath->path.numpoints; k++) {
-
+ double anglediff;
if ( k < labelpath->path.numpoints ) {
labelpath->path.point[k].x /= kernel_normal;
labelpath->path.point[k].y /= kernel_normal;
@@ -2076,7 +2076,9 @@
/* If the difference between the last char angle and the current one
is greater than the MAXOVERLAPANGLE value (set at 80% of 180deg by default)
, bail the label */
- if ( maxoverlapangle > 0 && (k > 2 && fabs(theta - labelpath->angles[k-2]) > maxoverlapangle) ) {
+ anglediff = fabs(theta - labelpath->angles[k-2]);
+ anglediff = MS_MIN(anglediff, MS_2PI - anglediff);
+ if ( maxoverlapangle > 0 && (k > 2 && anglediff > maxoverlapangle) ) {
goto LABEL_FAILURE;
}
More information about the mapserver-commits
mailing list