This is a recursive function delivering every possible combination of subgeometries.
Definition at line 519 of file measures3d.c.
520{
521 int i, j;
522 int n1 = 1;
523 int n2 = 1;
528
529 LWDEBUGF(2,
"lw_dist3d_recursive is called with type1=%d, type2=%d", lwg1->
type, lwg2->
type);
530
532 {
533 LWDEBUG(3,
"First geometry is collection");
536 }
538 {
539 LWDEBUG(3,
"Second geometry is collection");
542 }
543
544 for (i = 0; i < n1; i++)
545 {
548 else
550
552 continue;
553
555 {
556 LWDEBUG(3,
"Found collection inside first geometry collection, recursing");
559 continue;
560 }
561 for (j = 0; j < n2; j++)
562 {
565 else
567
569 continue;
570
572 {
573 LWDEBUG(3,
"Found collection inside second geometry collection, recursing");
576 continue;
577 }
578
579
580
583
588 }
589 }
591}
LWCOLLECTION * lwgeom_as_lwcollection(const LWGEOM *lwgeom)
int lwgeom_is_collection(const LWGEOM *lwgeom)
Determine whether a LWGEOM contains sub-geometries or not This basically just checks that the struct ...
#define LW_TRUE
Return types for functions with status returns.
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
int lw_dist3d_distribute_bruteforce(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS3D *dl)
This function distributes the brute-force for 3D so far the only type, tasks depending on type.
int lw_dist3d_recursive(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS3D *dl)
This is a recursive function delivering every possible combination of subgeometries.
References DIST_MIN, DISTPTS3D::distance, LWCOLLECTION::geoms, lw_dist3d_distribute_bruteforce(), lw_dist3d_recursive(), LW_FALSE, LW_TRUE, LWDEBUG, LWDEBUGF, lwgeom_as_lwcollection(), lwgeom_is_collection(), lwgeom_is_empty(), DISTPTS3D::mode, LWCOLLECTION::ngeoms, DISTPTS3D::tolerance, and LWGEOM::type.
Referenced by lw_dist3d_distanceline(), lw_dist3d_distancepoint(), lw_dist3d_recursive(), lwgeom_maxdistance3d_tolerance(), and lwgeom_mindistance3d_tolerance().