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