PostGIS  2.2.7dev-r@@SVN_REVISION@@
void geog2cart ( const GEOGRAPHIC_POINT g,
POINT3D p 
)

Convert spherical coordinates to cartesion coordinates on unit sphere.

Definition at line 354 of file lwgeodetic.c.

References GEOGRAPHIC_POINT::lat, GEOGRAPHIC_POINT::lon, POINT3D::x, POINT3D::y, and POINT3D::z.

Referenced by circ_center_cartesian(), circ_node_leaf_new(), circ_tree_contains_point(), circ_tree_distance_tree_internal(), CircTreePIP(), edge_calculate_gbox_slow(), edge_distance_to_point(), edge_point_in_cone(), edge_point_side(), line2pts(), lwpoly_covers_point2d(), ptarray_distance_spheroid(), ptarray_segmentize_sphere(), test_clairaut(), and test_edge_intersects().

355 {
356  p->x = cos(g->lat) * cos(g->lon);
357  p->y = cos(g->lat) * sin(g->lon);
358  p->z = sin(g->lat);
359 }
double y
Definition: liblwgeom.h:324
double x
Definition: liblwgeom.h:324
double z
Definition: liblwgeom.h:324

Here is the caller graph for this function: