PostGIS  3.0.0dev-r@@SVN_REVISION@@

◆ ptarray_collect_mvals()

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

Definition at line 998 of file lwlinearreferencing.c.

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

Referenced by lwgeom_cpa_within(), and lwgeom_tcpa().

999 {
1000  POINT4D pbuf;
1001  uint32_t i, n=0;
1002  for (i=0; i<pa->npoints; ++i)
1003  {
1004  getPoint4d_p(pa, i, &pbuf); /* could be optimized */
1005  if ( pbuf.m >= tmin && pbuf.m <= tmax )
1006  mvals[n++] = pbuf.m;
1007  }
1008  return n;
1009 }
double m
Definition: liblwgeom.h:354
unsigned int uint32_t
Definition: uthash.h:78
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
Definition: lwgeom_api.c:112
uint32_t npoints
Definition: liblwgeom.h:373
Here is the call graph for this function:
Here is the caller graph for this function: