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

Definition at line 790 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().

791 {
792  int i;
793 
794  if (circ_node_is_leaf(node))
795  {
796  printf("%*s[%d] C(%.5g %.5g) R(%.5g) ((%.5g %.5g),(%.5g,%.5g))",
797  3*depth + 6, "NODE", node->edge_num,
798  node->center.lon, node->center.lat,
799  node->radius,
800  node->p1->x, node->p1->y,
801  node->p2->x, node->p2->y
802  );
803  if ( node->geom_type )
804  {
805  printf(" %s", lwtype_name(node->geom_type));
806  }
807  if ( node->geom_type == POLYGONTYPE )
808  {
809  printf(" O(%.5g %.5g)", node->pt_outside.x, node->pt_outside.y);
810  }
811  printf("\n");
812 
813  }
814  else
815  {
816  printf("%*s C(%.5g %.5g) R(%.5g)",
817  3*depth + 6, "NODE",
818  node->center.lon, node->center.lat,
819  node->radius
820  );
821  if ( node->geom_type )
822  {
823  printf(" %s", lwtype_name(node->geom_type));
824  }
825  if ( node->geom_type == POLYGONTYPE )
826  {
827  printf(" O(%.5g %.5g)", node->pt_outside.x, node->pt_outside.y);
828  }
829  printf("\n");
830  }
831  for ( i = 0; i < node->num_nodes; i++ )
832  {
833  circ_tree_print(node->nodes[i], depth + 1);
834  }
835  return;
836 }
GEOGRAPHIC_POINT center
POINT2D * p2
#define POLYGONTYPE
Definition: liblwgeom.h:86
POINT2D * p1
double x
Definition: liblwgeom.h:327
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:216
void circ_tree_print(const CIRC_NODE *node, int depth)
double y
Definition: liblwgeom.h:327
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: