PostGIS  2.1.10dev-r@@SVN_REVISION@@
static LWGEOM * lwcollection_locate_between_m ( LWCOLLECTION lwcoll,
double  m0,
double  m1 
)
static

Definition at line 621 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().

622 {
623  int i;
624  int ngeoms=0;
625  LWGEOM **geoms;
626 
627  POSTGIS_DEBUGF(2, "lwcollection_locate_between_m called for lwcoll %x", lwcoll);
628 
629  geoms=lwalloc(sizeof(LWGEOM *)*lwcoll->ngeoms);
630  for (i=0; i<lwcoll->ngeoms; i++)
631  {
632  LWGEOM *sub=lwgeom_locate_between_m(lwcoll->geoms[i],
633  m0, m1);
634  if ( sub != NULL )
635  geoms[ngeoms++] = sub;
636  }
637 
638  if ( ngeoms == 0 ) return NULL;
639 
641  lwcoll->srid, NULL, ngeoms, geoms);
642 }
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:465
int32_t srid
Definition: liblwgeom.h:462
void * lwalloc(size_t size)
Definition: lwutil.c:175
#define COLLECTIONTYPE
Definition: liblwgeom.h:66

Here is the call graph for this function:

Here is the caller graph for this function: