PostGIS  2.5.0dev-r@@SVN_REVISION@@
static double dot_product ( const POINT3D p1,
const POINT3D p2 

Convert cartesion coordinates on unit sphere to lon/lat coordinates static void cart2ll(const POINT3D *p, POINT2D *g) { g->x = longitude_degrees_normalize(180.0 * atan2(p->y, p->x) / M_PI); g->y = latitude_degrees_normalize(180.0 * asin(p->z) / M_PI); }.

Calculate the dot product of two unit vectors (-1 == opposite, 0 == orthogonal, 1 == identical)

Definition at line 411 of file lwgeodetic.c.

References POINT3D::x, POINT3D::y, and POINT3D::z.

Referenced by dot_product_side(), edge_calculate_gbox(), edge_distance_to_point(), edge_intersection(), edge_intersects(), edge_point_in_cone(), edge_point_side(), point_in_cone(), sphere_distance_cartesian(), unit_normal(), and vector_angle().

412 {
413  return (p1->x*p2->x) + (p1->y*p2->y) + (p1->z*p2->z);
414 }
double y
Definition: liblwgeom.h:339
double x
Definition: liblwgeom.h:339
double z
Definition: liblwgeom.h:339

Here is the caller graph for this function: