PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ circ_tree_get_point_outside()

int circ_tree_get_point_outside ( const CIRC_NODE node,

Definition at line 475 of file lwgeodetic_tree.c.

476 {
477  POINT3D center3d;
479  // if (node->radius >= M_PI) return LW_FAILURE;
480  geog2cart(&(node->center), &center3d);
481  vector_scale(&center3d, -1.0);
482  cart2geog(&center3d, &g);
483  pt->x = rad2deg(g.lon);
484  pt->y = rad2deg(;
485  return LW_SUCCESS;
486 }
#define LW_SUCCESS
Definition: liblwgeom.h:80
void vector_scale(POINT3D *n, double scale)
Scale a vector out by a factor.
Definition: lwgeodetic.c:487
void cart2geog(const POINT3D *p, GEOGRAPHIC_POINT *g)
Convert cartesian coordinates on unit sphere to spherical coordinates.
Definition: lwgeodetic.c:414
void geog2cart(const GEOGRAPHIC_POINT *g, POINT3D *p)
Convert spherical coordinates to cartesian coordinates on unit sphere.
Definition: lwgeodetic.c:404
#define rad2deg(r)
Definition: lwgeodetic.h:80
Point in spherical coordinates on the world.
Definition: lwgeodetic.h:53
double y
Definition: liblwgeom.h:331
double x
Definition: liblwgeom.h:331

References cart2geog(), circ_node::center, geog2cart(), GEOGRAPHIC_POINT::lat, GEOGRAPHIC_POINT::lon, LW_SUCCESS, rad2deg, vector_scale(), POINT2D::x, and POINT2D::y.

Referenced by CircTreePIP().

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