PostGIS  2.1.10dev-r@@SVN_REVISION@@
double lwpoint_get_x ( const LWPOINT point)

Definition at line 48 of file lwpoint.c.

References getPoint4d_p(), lwerror(), lwpoint_is_empty(), LWPOINT::point, and POINT4D::x.

Referenced by BOX2D_construct(), geometry_to_point(), lwgeom_azumith_spheroid(), and lwgeom_project_spheroid().

49 {
50  POINT4D pt;
51  if ( lwpoint_is_empty(point) )
52  lwerror("lwpoint_get_x called with empty geometry");
53  getPoint4d_p(point->point, 0, &pt);
54  return pt.x;
55 }
double x
Definition: liblwgeom.h:308
Definition: liblwgeom.h:367
int lwpoint_is_empty(const LWPOINT *point)
Definition: lwpoint.c:258
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:67
int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point)
Definition: lwgeom_api.c:217

Here is the call graph for this function:

Here is the caller graph for this function: