PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ circ_tree_get_point()

int circ_tree_get_point ( const CIRC_NODE node,
POINT2D pt 
)

Returns a POINT2D that is a vertex of the input shape.

Definition at line 461 of file lwgeodetic_tree.c.

References circ_node_is_leaf(), circ_tree_get_point(), LW_SUCCESS, circ_node::nodes, circ_node::p1, POINT2D::x, and POINT2D::y.

Referenced by circ_tree_distance_tree_internal(), circ_tree_get_point(), and geography_distance_cache_tolerance().

462 {
463  if ( circ_node_is_leaf(node) )
464  {
465  pt->x = node->p1->x;
466  pt->y = node->p1->y;
467  return LW_SUCCESS;
468  }
469  else
470  {
471  return circ_tree_get_point(node->nodes[0], pt);
472  }
473 }
int circ_tree_get_point(const CIRC_NODE *node, POINT2D *pt)
Returns a POINT2D that is a vertex of the input shape.
POINT2D * p1
#define LW_SUCCESS
Definition: liblwgeom.h:79
double x
Definition: liblwgeom.h:330
static int circ_node_is_leaf(const CIRC_NODE *node)
Internal nodes have their point references set to NULL.
double y
Definition: liblwgeom.h:330
struct circ_node ** nodes
Here is the call graph for this function:
Here is the caller graph for this function: