PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ rect_tree_is_area()

static int rect_tree_is_area ( const RECT_NODE node)
static

Definition at line 436 of file lwtree.c.

437 {
438  switch (node->geom_type)
439  {
440  case POLYGONTYPE:
441  case CURVEPOLYTYPE:
442  case MULTISURFACETYPE:
443  return LW_TRUE;
444 
445  case COLLECTIONTYPE:
446  {
447  if (rect_node_is_leaf(node))
448  return LW_FALSE;
449  else
450  {
451  int i;
452  for (i = 0; i < node->i.num_nodes; i++)
453  {
454  if (rect_tree_is_area(node->i.nodes[i]))
455  return LW_TRUE;
456  }
457  return LW_FALSE;
458  }
459  }
460 
461  default:
462  return LW_FALSE;
463  }
464 }
#define LW_FALSE
Definition: liblwgeom.h:77
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
#define CURVEPOLYTYPE
Definition: liblwgeom.h:94
#define MULTISURFACETYPE
Definition: liblwgeom.h:96
#define POLYGONTYPE
Definition: liblwgeom.h:87
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:76
static int rect_tree_is_area(const RECT_NODE *node)
Definition: lwtree.c:436
static int rect_node_is_leaf(const RECT_NODE *node)
Definition: lwtree.c:31
struct rect_node * nodes[RECT_NODE_SIZE]
Definition: lwtree.h:61
RECT_NODE_INTERNAL i
Definition: lwtree.h:75
unsigned char geom_type
Definition: lwtree.h:68

References COLLECTIONTYPE, CURVEPOLYTYPE, rect_node::geom_type, rect_node::i, LW_FALSE, LW_TRUE, MULTISURFACETYPE, RECT_NODE_INTERNAL::nodes, RECT_NODE_INTERNAL::num_nodes, POLYGONTYPE, and rect_node_is_leaf().

Referenced by rect_tree_distance_tree(), and rect_tree_intersects_tree().

Here is the call graph for this function:
Here is the caller graph for this function: