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

Definition at line 80 of file lwpoint.c.

References LWPOINT::flags, FLAGS_GET_M, getPoint4d_p(), lwerror(), lwpoint_is_empty(), POINT4D::m, and LWPOINT::point.

Referenced by lwmpoint_locate_along(), and lwpoint_locate_along().

81 {
82  POINT4D pt;
83  if ( lwpoint_is_empty(point) )
84  lwerror("lwpoint_get_m called with empty geometry");
85  if ( ! FLAGS_GET_M(point->flags) )
86  lwerror("lwpoint_get_m called without m dimension");
87  getPoint4d_p(point->point, 0, &pt);
88  return pt.m;
89 }
double m
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
uint8_t flags
Definition: liblwgeom.h:364
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:107
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: