PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwpoint_locate_between_m()

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

Definition at line 519 of file lwgeom_functions_lrs.c.

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

Referenced by lwgeom_locate_between_m().

520 {
521  POINT3DM p3dm;
522 
523  POSTGIS_DEBUGF(2, "lwpoint_locate_between called for lwpoint %p", lwpoint);
524 
525  lwpoint_getPoint3dm_p(lwpoint, &p3dm);
526  if ( p3dm.m >= m0 && p3dm.m <= m1)
527  {
528  POSTGIS_DEBUG(3, " lwpoint... returning a clone of input");
529 
530  return (LWGEOM *)lwpoint_clone(lwpoint);
531  }
532  else
533  {
534  POSTGIS_DEBUG(3, " lwpoint... returning a clone of input");
535 
536  return NULL;
537  }
538 }
double m
Definition: liblwgeom.h:346
LWPOINT * lwpoint_clone(const LWPOINT *lwgeom)
Definition: lwpoint.c:239
int lwpoint_getPoint3dm_p(const LWPOINT *point, POINT3DM *out)
Definition: lwpoint.c:52
Here is the call graph for this function:
Here is the caller graph for this function: