]> granicus.if.org Git - postgis/commitdiff
Fix variable decls in debug statements
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 25 Feb 2014 17:56:51 +0000 (17:56 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 25 Feb 2014 17:56:51 +0000 (17:56 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12283 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/geography_measurement_trees.c
postgis/gserialized_estimate.c

index a80ab5da82445fdb2a51e76a36af8f6804428fef..387661abbac67b33036a5fdeec06fbcc0f9f3b51 100644 (file)
@@ -85,7 +85,7 @@ CircTreePIP(const CIRC_NODE* tree1, const GSERIALIZED* g1, const POINT4D* in_poi
        GEOGRAPHIC_POINT in_gpoint;
        POINT3D in_point3d;
 
-       POSTGIS_DEBUGF(3, "tree1_type=%d, lwgeom2->type=%d", tree1_type, lwgeom2->type);
+       POSTGIS_DEBUGF(3, "tree1_type=%d", tree1_type);
 
        /* If the tree'ed argument is a polygon, do the P-i-P using the tree-based P-i-P */
        if ( tree1_type == POLYGONTYPE || tree1_type == MULTIPOLYGONTYPE )
@@ -235,7 +235,7 @@ geography_dwithin_cache(FunctionCallInfoData* fcinfo, const GSERIALIZED* g1, con
 /*     if ( LW_SUCCESS == geography_distance_cache_tolerance(fcinfo, g1, g2, s, tolerance, &distance) ) */
        if ( LW_SUCCESS == geography_distance_cache_tolerance(fcinfo, g1, g2, s, FP_TOLERANCE, &distance) ) 
        {
-               *dwithin = (distance <= tolerance ? LW_TRUE : LW_FALSE);
+               *dwithin = (distance <= (tolerance + FP_TOLERANCE) ? LW_TRUE : LW_FALSE);
                return LW_SUCCESS;
        }
        return LW_FAILURE;
index 568580943487bf9973aba7edc0e01927fcf5ca29..4c71306deb32a4484e0ca96ca073193f19e616b2 100644 (file)
@@ -753,16 +753,18 @@ nd_box_array_distribution(const ND_BOX **nd_boxes, int num_boxes, const ND_BOX *
 
                /* How dispersed is the distribution of features across bins? */
                range = range_quintile(counts, num_bins);
+
 #if POSTGIS_DEBUG_LEVEL >= 3
                average = avg(counts, num_bins);
                sdev = stddev(counts, num_bins);
                sdev_ratio = sdev/average;
-#endif
-               
+
                POSTGIS_DEBUGF(3, " dimension %d: range = %d", d, range);
                POSTGIS_DEBUGF(3, " dimension %d: average = %.6g", d, average);
                POSTGIS_DEBUGF(3, " dimension %d: stddev = %.6g", d, sdev);
                POSTGIS_DEBUGF(3, " dimension %d: stddev_ratio = %.6g", d, sdev_ratio);
+#endif
+               
                distribution[d] = range;
        }