From 16bd22df7edab677c641e6de450527ad2d6d0d6f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ra=C3=BAl=20Mar=C3=ADn=20Rodr=C3=ADguez?= Date: Tue, 13 Nov 2018 10:49:06 +0000 Subject: [PATCH] Un-break build with debug logs Related to #4235 git-svn-id: http://svn.osgeo.org/postgis/trunk@17007 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwstroke.c | 30 +++++++++++++++++++----------- postgis/gserialized_spgist_2d.c | 2 -- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/liblwgeom/lwstroke.c b/liblwgeom/lwstroke.c index b89802c06..f68066e40 100644 --- a/liblwgeom/lwstroke.c +++ b/liblwgeom/lwstroke.c @@ -178,8 +178,11 @@ static double angle_increment_using_max_deviation(double max_deviation, double r if ( maxErr > radius * 2 ) { maxErr = radius * 2; - LWDEBUGF(2, "lwarc_linearize: tolerance %g is too big, " - "using arc-max 2 * radius == %g", tol, maxErr); + LWDEBUGF(2, + "lwarc_linearize: tolerance %g is too big, " + "using arc-max 2 * radius == %g", + max_deviation, + maxErr); } do { halfAngle = acos( 1.0 - maxErr / radius ); @@ -191,7 +194,13 @@ static double angle_increment_using_max_deviation(double max_deviation, double r maxErr *= 2; } while(1); increment = 2 * halfAngle; - LWDEBUGF(2, "lwarc_linearize: maxDiff:%g, radius:%g, halfAngle:%g, increment:%g (%g degrees)", tol, radius, halfAngle, increment, increment*180/M_PI); + LWDEBUGF(2, + "lwarc_linearize: maxDiff:%g, radius:%g, halfAngle:%g, increment:%g (%g degrees)", + max_deviation, + radius, + halfAngle, + increment, + increment * 180 / M_PI); return increment; } @@ -337,12 +346,11 @@ lwarc_linearize(POINTARRAY *to, } if ( flags & LW_LINEARIZE_FLAG_SYMMETRIC ) - {{ - LWDEBUGF(2, "lwarc_linearize SYMMETRIC requested - total angle %g deg", - angle * 180 / M_PI); + { + LWDEBUGF(2, "lwarc_linearize SYMMETRIC requested - total angle %g deg", total_angle * 180 / M_PI); if ( flags & LW_LINEARIZE_FLAG_RETAIN_ANGLE ) - {{ + { /* Number of complete steps */ int steps = trunc(total_angle / increment); @@ -360,9 +368,9 @@ lwarc_linearize(POINTARRAY *to, "total angle %g, steps %d, increment %g, remainder %g", total_angle * 180 / M_PI, steps, increment * 180 / M_PI, angle_remainder * 180 / M_PI); - }} + } else - {{ + { /* Number of segments in output */ int segs = ceil(total_angle / increment); /* Tweak increment to be regular for all the arc */ @@ -372,8 +380,8 @@ lwarc_linearize(POINTARRAY *to, "total angle %g degrees - LINESTRING(%g %g,%g %g,%g %g) - S:%d - I:%g", total_angle*180/M_PI, p1->x, p1->y, center.x, center.y, p3->x, p3->y, segs, increment*180/M_PI); - }} - }} + } + } /* p2 on left side => clockwise sweep */ if ( clockwise ) diff --git a/postgis/gserialized_spgist_2d.c b/postgis/gserialized_spgist_2d.c index da24cef3e..7c0df2284 100644 --- a/postgis/gserialized_spgist_2d.c +++ b/postgis/gserialized_spgist_2d.c @@ -679,8 +679,6 @@ PGDLLEXPORT Datum gserialized_spgist_compress_2d(PG_FUNCTION_ARGS) PG_RETURN_POINTER(bbox_out); } - POSTGIS_DEBUGF(4, "[SPGIST] got box: %s", box2df_to_string(bbox_out)); - /* Check all the dimensions for finite values */ if ((!isfinite(bbox_out->xmax) || !isfinite(bbox_out->xmin)) || (!isfinite(bbox_out->ymax) || !isfinite(bbox_out->ymin))) -- 2.40.0