This is a recursive function delivering every possible combinatin of subgeometries.
Definition at line 277 of file measures.c.
References LWGEOM::bbox, DIST_MAX, DIST_MIN, DISTPTS::distance, LWCOLLECTION::geoms, LINETYPE, lw_dist2d_check_overlap(), lw_dist2d_distribute_bruteforce(), lw_dist2d_distribute_fast(), lw_dist2d_is_collection(), lw_dist2d_recursive(), LW_FALSE, LW_TRUE, LWDEBUG, LWDEBUGF, lwgeom_add_bbox(), lwgeom_as_lwcollection(), lwgeom_is_empty(), DISTPTS::mode, LWCOLLECTION::ngeoms, POLYGONTYPE, DISTPTS::tolerance, and LWGEOM::type.
Referenced by lw_dist2d_comp(), lw_dist2d_curvepoly_curvepoly(), lw_dist2d_line_curvepoly(), lw_dist2d_point_curvepoly(), and lw_dist2d_recursive().
287 LWDEBUGF(2,
"lw_dist2d_comp is called with type1=%d, type2=%d", lwg1->
type, lwg2->
type);
291 LWDEBUG(3,
"First geometry is collection");
297 LWDEBUG(3,
"Second geometry is collection");
302 for ( i = 0; i < n1; i++ )
318 LWDEBUG(3,
"Found collection inside first geometry collection, recursing");
322 for ( j = 0; j < n2; j++ )
334 LWDEBUG(3,
"Found collection inside second geometry collection, recursing");
int lw_dist2d_recursive(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS *dl)
This is a recursive function delivering every possible combinatin of subgeometries.
#define LWDEBUG(level, msg)
static int lw_dist2d_is_collection(const LWGEOM *g)
#define LW_TRUE
Return types for functions with status returns.
int lw_dist2d_distribute_bruteforce(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS *dl)
int lw_dist2d_check_overlap(LWGEOM *lwg1, LWGEOM *lwg2)
We have to check for overlapping bboxes.
LWCOLLECTION * lwgeom_as_lwcollection(const LWGEOM *lwgeom)
void lwgeom_add_bbox(LWGEOM *lwgeom)
Compute a bbox if not already computed.
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members) ...
#define LWDEBUGF(level, msg,...)
int lw_dist2d_distribute_fast(LWGEOM *lwg1, LWGEOM *lwg2, DISTPTS *dl)
Here the geometries are distributed for the new faster distance-calculations.