This is a recursive function delivering every possible combination of subgeometries.
Definition at line 485 of file measures3d.c.
495 LWDEBUGF(2,
"lw_dist3d_recursive is called with type1=%d, type2=%d", lwg1->
type, lwg2->
type);
499 LWDEBUG(3,
"First geometry is collection");
505 LWDEBUG(3,
"Second geometry is collection");
510 for (i = 0; i < n1; i++)
522 LWDEBUG(3,
"Found collection inside first geometry collection, recursing");
527 for (j = 0; j < n2; j++)
539 LWDEBUG(3,
"Found collection inside second geometry collection, recursing");
int lwgeom_is_collection(const LWGEOM *lwgeom)
Determine whether a LWGEOM can contain sub-geometries or not.
LWCOLLECTION * lwgeom_as_lwcollection(const LWGEOM *lwgeom)
#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_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(), lwgeom_maxdistance3d_tolerance(), and lwgeom_mindistance3d_tolerance().