PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwpoint_locate_between_m()

static LWGEOM * lwpoint_locate_between_m ( LWPOINT lwpoint,
double  m0,
double  m1 
)
static

Definition at line 506 of file lwgeom_functions_lrs.c.

References lwpoint_clone(), lwpoint_getPoint3dm_p(), and POINT3DM::m.

Referenced by lwgeom_locate_between_m().

507 {
508  POINT3DM p3dm;
509 
510  POSTGIS_DEBUGF(2, "lwpoint_locate_between called for lwpoint %p", lwpoint);
511 
512  lwpoint_getPoint3dm_p(lwpoint, &p3dm);
513  if ( p3dm.m >= m0 && p3dm.m <= m1)
514  {
515  POSTGIS_DEBUG(3, " lwpoint... returning a clone of input");
516 
517  return (LWGEOM *)lwpoint_clone(lwpoint);
518  }
519  else
520  {
521  POSTGIS_DEBUG(3, " lwpoint... returning a clone of input");
522 
523  return NULL;
524  }
525 }
double m
Definition: liblwgeom.h:330
LWPOINT * lwpoint_clone(const LWPOINT *lwgeom)
Definition: lwpoint.c:208
int lwpoint_getPoint3dm_p(const LWPOINT *point, POINT3DM *out)
Definition: lwpoint.c:39
Here is the call graph for this function:
Here is the caller graph for this function: