PostGIS  2.4.9dev-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 459 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().

460 {
461  if ( circ_node_is_leaf(node) )
462  {
463  pt->x = node->p1->x;
464  pt->y = node->p1->y;
465  return LW_SUCCESS;
466  }
467  else
468  {
469  return circ_tree_get_point(node->nodes[0], pt);
470  }
471 }
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:80
double x
Definition: liblwgeom.h:328
static int circ_node_is_leaf(const CIRC_NODE *node)
Internal nodes have their point references set to NULL.
double y
Definition: liblwgeom.h:328
struct circ_node ** nodes
Here is the call graph for this function:
Here is the caller graph for this function: