PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ ptarray_collect_mvals()

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

Definition at line 1065 of file lwlinearreferencing.c.

1066 {
1067  POINT4D pbuf;
1068  uint32_t i, n = 0;
1069  for (i = 0; i < pa->npoints; ++i)
1070  {
1071  getPoint4d_p(pa, i, &pbuf); /* could be optimized */
1072  if (pbuf.m >= tmin && pbuf.m <= tmax)
1073  mvals[n++] = pbuf.m;
1074  }
1075  return n;
1076 }
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
Definition: lwgeom_api.c:125
double m
Definition: liblwgeom.h:400
uint32_t npoints
Definition: liblwgeom.h:413

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

Referenced by lwgeom_cpa_within(), and lwgeom_tcpa().

Here is the call graph for this function:
Here is the caller graph for this function: