PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwcollection_locate_between_m()

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

Definition at line 629 of file lwgeom_functions_lrs.c.

630 {
631  uint32_t i;
632  int ngeoms=0;
633  LWGEOM **geoms;
634 
635  POSTGIS_DEBUGF(2, "lwcollection_locate_between_m called for lwcoll %p", lwcoll);
636 
637  geoms=lwalloc(sizeof(LWGEOM *)*lwcoll->ngeoms);
638  for (i=0; i<lwcoll->ngeoms; i++)
639  {
640  LWGEOM *sub=lwgeom_locate_between_m(lwcoll->geoms[i],
641  m0, m1);
642  if ( sub != NULL )
643  geoms[ngeoms++] = sub;
644  }
645 
646  if ( ngeoms == 0 ) return NULL;
647 
649  lwcoll->srid, NULL, ngeoms, geoms);
650 }
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
LWCOLLECTION * lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
Definition: lwcollection.c:43
void * lwalloc(size_t size)
Definition: lwutil.c:229
static LWGEOM * lwgeom_locate_between_m(LWGEOM *lwin, double m0, double m1)
uint32_t ngeoms
Definition: liblwgeom.h:510
LWGEOM ** geoms
Definition: liblwgeom.h:512
int32_t srid
Definition: liblwgeom.h:509
unsigned int uint32_t
Definition: uthash.h:78

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

Referenced by lwgeom_locate_between_m().

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