PostGIS  2.1.10dev-r@@SVN_REVISION@@
LWCOLLECTION* lwcollection_segmentize2d ( LWCOLLECTION coll,
double  dist 
)

Definition at line 220 of file lwcollection.c.

References LWCOLLECTION::geoms, lwalloc(), lwcollection_clone(), lwcollection_construct(), lwgeom_segmentize2d(), LWCOLLECTION::ngeoms, LWCOLLECTION::srid, and LWCOLLECTION::type.

Referenced by lwgeom_segmentize2d().

221 {
222  uint32_t i;
223  LWGEOM **newgeoms;
224 
225  if ( ! col->ngeoms ) return lwcollection_clone(col);
226 
227  newgeoms = lwalloc(sizeof(LWGEOM *)*col->ngeoms);
228  for (i=0; i<col->ngeoms; i++)
229  newgeoms[i] = lwgeom_segmentize2d(col->geoms[i], dist);
230 
231  return lwcollection_construct(col->type, col->srid, NULL, col->ngeoms, newgeoms);
232 }
LWCOLLECTION * lwcollection_clone(const LWCOLLECTION *g)
Clone LWCOLLECTION object.
Definition: lwcollection.c:110
LWCOLLECTION * lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
Definition: lwcollection.c:30
LWGEOM * lwgeom_segmentize2d(LWGEOM *line, double dist)
Definition: lwgeom.c:624
void * lwalloc(size_t size)
Definition: lwutil.c:175

Here is the call graph for this function:

Here is the caller graph for this function: