Calculate the centroid->centroid distance between the boxes.
Calculate the box->box distance.
654 ndims = Min(GIDX_NDIMS(b), GIDX_NDIMS(a));
655 for ( i = 0; i < ndims; ++i )
658 double amin = GIDX_GET_MIN(a,i);
659 double amax = GIDX_GET_MAX(a,i);
660 double bmin = GIDX_GET_MIN(b,i);
661 double bmax = GIDX_GET_MAX(b,i);
662 POSTGIS_DEBUGF(3,
"A %g - %g", amin, amax);
663 POSTGIS_DEBUGF(3,
"B %g - %g", bmin, bmax);
665 if ( ( amin <= bmax && amax >= bmin ) )
670 else if ( i == 4 && m_is_time )
674 else if ( bmax < amin )
682 assert( bmin > amax );
691 POSTGIS_DEBUGF(3,
"dist %g, squared %g, grows sum to %g", d, d*d, sum);