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 )
/* 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;
/* 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;
}