PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ circ_tree_print()

void circ_tree_print ( const CIRC_NODE node,
int  depth 
)

Definition at line 870 of file lwgeodetic_tree.c.

871 {
872  uint32_t i;
873 
874  if (circ_node_is_leaf(node))
875  {
876  printf("%*s[%d] C(%.5g %.5g) R(%.5g) ((%.5g %.5g),(%.5g,%.5g))",
877  3*depth + 6, "NODE", node->edge_num,
878  node->center.lon, node->center.lat,
879  node->radius,
880  node->p1->x, node->p1->y,
881  node->p2->x, node->p2->y
882  );
883  if ( node->geom_type )
884  {
885  printf(" %s", lwtype_name(node->geom_type));
886  }
887  if ( node->geom_type == POLYGONTYPE )
888  {
889  printf(" O(%.5g %.5g)", node->pt_outside.x, node->pt_outside.y);
890  }
891  printf("\n");
892 
893  }
894  else
895  {
896  printf("%*s C(%.5g %.5g) R(%.5g)",
897  3*depth + 6, "NODE",
898  node->center.lon, node->center.lat,
899  node->radius
900  );
901  if ( node->geom_type )
902  {
903  printf(" %s", lwtype_name(node->geom_type));
904  }
905  if ( node->geom_type == POLYGONTYPE )
906  {
907  printf(" O(%.15g %.15g)", node->pt_outside.x, node->pt_outside.y);
908  }
909  printf("\n");
910  }
911  for ( i = 0; i < node->num_nodes; i++ )
912  {
913  circ_tree_print(node->nodes[i], depth + 1);
914  }
915  return;
916 }
#define POLYGONTYPE
Definition: liblwgeom.h:118
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:216
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:376
double x
Definition: liblwgeom.h:376
uint32_t num_nodes
POINT2D * p2
struct circ_node ** nodes
double radius
POINT2D * p1
POINT2D pt_outside
GEOGRAPHIC_POINT center
uint32_t geom_type

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: