This is a recursive function delivering every possible combination of subgeometries.
Definition at line 284 of file measures.c.
285{
286 int i, j;
287 int n1 = 1;
288 int n2 = 1;
293
294 LWDEBUGF(2,
"lw_dist2d_comp is called with type1=%d, type2=%d", lwg1->
type, lwg2->
type);
295
297 {
298 LWDEBUG(3,
"First geometry is collection");
301 }
303 {
304 LWDEBUG(3,
"Second geometry is collection");
307 }
308
309 for (i = 0; i < n1; i++)
310 {
311
314 else
316
317 if (!g1) continue;
318
320 continue;
321
323 {
324 LWDEBUG(3,
"Found collection inside first geometry collection, recursing");
327 continue;
328 }
329 for (j = 0; j < n2; j++)
330 {
333 else
335
336 if (!g2) continue;
337
339 {
340 LWDEBUG(3,
"Found collection inside second geometry collection, recursing");
343 continue;
344 }
345
348
351
352
354 continue;
355
359 {
362 }
363 else
364 {
369 }
370 }
371 }
373}
LWCOLLECTION * lwgeom_as_lwcollection(const LWGEOM *lwgeom)
#define LW_TRUE
Return types for functions with status returns.
void lwgeom_add_bbox(LWGEOM *lwgeom)
Compute a bbox if not already computed.
#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)
static int lw_dist2d_check_overlap(const LWGEOM *lwg1, const LWGEOM *lwg2)
int lw_dist2d_recursive(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS *dl)
This is a recursive function delivering every possible combination of subgeometries.
static int lw_dist2d_is_collection(const LWGEOM *g)
int lw_dist2d_distribute_bruteforce(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS *dl)
int lw_dist2d_distribute_fast(LWGEOM *lwg1, LWGEOM *lwg2, DISTPTS *dl)
Geometries are distributed for the new faster distance-calculations.
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, TRIANGLETYPE, and LWGEOM::type.
Referenced by lw_dist2d_comp(), lw_dist2d_curvepoly_curvepoly(), lw_dist2d_line_curvepoly(), lw_dist2d_point_curvepoly(), lw_dist2d_recursive(), and lw_dist2d_tri_curvepoly().