PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ ptarray_collect_mvals()

static int ptarray_collect_mvals ( const POINTARRAY pa,
double  tmin,
double  tmax,
double *  mvals 
)
static

Definition at line 992 of file lwlinearreferencing.c.

References getPoint4d_p(), POINT4D::m, and POINTARRAY::npoints.

Referenced by lwgeom_cpa_within(), and lwgeom_tcpa().

993 {
994  POINT4D pbuf;
995  int i, n=0;
996  for (i=0; i<pa->npoints; ++i)
997  {
998  getPoint4d_p(pa, i, &pbuf); /* could be optimized */
999  if ( pbuf.m >= tmin && pbuf.m <= tmax )
1000  mvals[n++] = pbuf.m;
1001  }
1002  return n;
1003 }
double m
Definition: liblwgeom.h:352
int npoints
Definition: liblwgeom.h:371
int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point)
Definition: lwgeom_api.c:122
Here is the call graph for this function:
Here is the caller graph for this function: