PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ circ_tree_print()

void circ_tree_print ( const CIRC_NODE node,
int  depth 
)

Definition at line 854 of file lwgeodetic_tree.c.

855 {
856  uint32_t i;
857 
858  if (circ_node_is_leaf(node))
859  {
860  printf("%*s[%d] C(%.5g %.5g) R(%.5g) ((%.5g %.5g),(%.5g,%.5g))",
861  3*depth + 6, "NODE", node->edge_num,
862  node->center.lon, node->center.lat,
863  node->radius,
864  node->p1->x, node->p1->y,
865  node->p2->x, node->p2->y
866  );
867  if ( node->geom_type )
868  {
869  printf(" %s", lwtype_name(node->geom_type));
870  }
871  if ( node->geom_type == POLYGONTYPE )
872  {
873  printf(" O(%.5g %.5g)", node->pt_outside.x, node->pt_outside.y);
874  }
875  printf("\n");
876 
877  }
878  else
879  {
880  printf("%*s C(%.5g %.5g) R(%.5g)",
881  3*depth + 6, "NODE",
882  node->center.lon, node->center.lat,
883  node->radius
884  );
885  if ( node->geom_type )
886  {
887  printf(" %s", lwtype_name(node->geom_type));
888  }
889  if ( node->geom_type == POLYGONTYPE )
890  {
891  printf(" O(%.5g %.5g)", node->pt_outside.x, node->pt_outside.y);
892  }
893  printf("\n");
894  }
895  for ( i = 0; i < node->num_nodes; i++ )
896  {
897  circ_tree_print(node->nodes[i], depth + 1);
898  }
899  return;
900 }
#define POLYGONTYPE
Definition: liblwgeom.h:87
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:218
void circ_tree_print(const CIRC_NODE *node, int depth)
static int circ_node_is_leaf(const CIRC_NODE *node)
Internal nodes have their point references set to NULL.
double y
Definition: liblwgeom.h:331
double x
Definition: liblwgeom.h:331
uint32_t num_nodes
POINT2D * p2
struct circ_node ** nodes
double radius
POINT2D * p1
POINT2D pt_outside
GEOGRAPHIC_POINT center
uint32_t geom_type
unsigned int uint32_t
Definition: uthash.h:78

References circ_node::center, circ_node_is_leaf(), circ_node::edge_num, circ_node::geom_type, GEOGRAPHIC_POINT::lat, GEOGRAPHIC_POINT::lon, lwtype_name(), sort_node::node, circ_node::nodes, circ_node::num_nodes, circ_node::p1, circ_node::p2, POLYGONTYPE, circ_node::pt_outside, circ_node::radius, POINT2D::x, and POINT2D::y.

Here is the call graph for this function: