PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwcollection_locate_between_m()

static LWGEOM * lwcollection_locate_between_m ( LWCOLLECTION lwcoll,
double  m0,
double  m1 
)
static

Definition at line 616 of file lwgeom_functions_lrs.c.

References COLLECTIONTYPE, LWCOLLECTION::geoms, lwalloc(), lwcollection_construct(), lwgeom_locate_between_m(), LWCOLLECTION::ngeoms, and LWCOLLECTION::srid.

Referenced by lwgeom_locate_between_m().

617 {
618  int i;
619  int ngeoms=0;
620  LWGEOM **geoms;
621 
622  POSTGIS_DEBUGF(2, "lwcollection_locate_between_m called for lwcoll %p", lwcoll);
623 
624  geoms=lwalloc(sizeof(LWGEOM *)*lwcoll->ngeoms);
625  for (i=0; i<lwcoll->ngeoms; i++)
626  {
627  LWGEOM *sub=lwgeom_locate_between_m(lwcoll->geoms[i],
628  m0, m1);
629  if ( sub != NULL )
630  geoms[ngeoms++] = sub;
631  }
632 
633  if ( ngeoms == 0 ) return NULL;
634 
636  lwcoll->srid, NULL, ngeoms, geoms);
637 }
LWCOLLECTION * lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
Definition: lwcollection.c:30
static LWGEOM * lwgeom_locate_between_m(LWGEOM *lwin, double m0, double m1)
LWGEOM ** geoms
Definition: liblwgeom.h:493
int32_t srid
Definition: liblwgeom.h:490
void * lwalloc(size_t size)
Definition: lwutil.c:199
#define COLLECTIONTYPE
Definition: liblwgeom.h:76
Here is the call graph for this function:
Here is the caller graph for this function: