PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ circ_tree_print()

void circ_tree_print ( const CIRC_NODE node,
int  depth 
)

Definition at line 869 of file lwgeodetic_tree.c.

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

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(), 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.

Referenced by circ_tree_print().

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