PostGIS  2.1.10dev-r@@SVN_REVISION@@
void circ_tree_print ( const CIRC_NODE node,
int  depth 
)

Definition at line 759 of file lwgeodetic_tree.c.

References circ_node::center, circ_node_is_leaf(), circ_tree_print(), circ_node::edge_num, circ_node::geom_type, GEOGRAPHIC_POINT::lat, GEOGRAPHIC_POINT::lon, lwtype_name(), 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.

Referenced by circ_tree_print().

760 {
761  int i;
762 
763  if (circ_node_is_leaf(node))
764  {
765  printf("%*s[%d] C(%.5g %.5g) R(%.5g) ((%.5g %.5g),(%.5g,%.5g))",
766  3*depth + 6, "NODE", node->edge_num,
767  node->center.lon, node->center.lat,
768  node->radius,
769  node->p1->x, node->p1->y,
770  node->p2->x, node->p2->y
771  );
772  if ( node->geom_type )
773  {
774  printf(" %s", lwtype_name(node->geom_type));
775  }
776  if ( node->geom_type == POLYGONTYPE )
777  {
778  printf(" O(%.5g %.5g)", node->pt_outside.x, node->pt_outside.y);
779  }
780  printf("\n");
781 
782  }
783  else
784  {
785  printf("%*s C(%.5g %.5g) R(%.5g)",
786  3*depth + 6, "NODE",
787  node->center.lon, node->center.lat,
788  node->radius
789  );
790  if ( node->geom_type )
791  {
792  printf(" %s", lwtype_name(node->geom_type));
793  }
794  if ( node->geom_type == POLYGONTYPE )
795  {
796  printf(" O(%.5g %.5g)", node->pt_outside.x, node->pt_outside.y);
797  }
798  printf("\n");
799  }
800  for ( i = 0; i < node->num_nodes; i++ )
801  {
802  circ_tree_print(node->nodes[i], depth + 1);
803  }
804  return;
805 }
GEOGRAPHIC_POINT center
POINT2D * p2
#define POLYGONTYPE
Definition: liblwgeom.h:62
POINT2D * p1
double x
Definition: liblwgeom.h:284
static int circ_node_is_leaf(const CIRC_NODE *node)
Internal nodes have their point references set to NULL.
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:164
void circ_tree_print(const CIRC_NODE *node, int depth)
double y
Definition: liblwgeom.h:284
POINT2D pt_outside
double radius
struct circ_node ** nodes

Here is the call graph for this function:

Here is the caller graph for this function: