Definition at line 121 of file lwgeom_wrapx.c.
126 int outtype = lwcoll_in->
type;
131 lwerror(
"Out of virtual memory");
135 for (i=0; i<lwcoll_in->
ngeoms; ++i)
137 LWDEBUGF(3,
"Wrapping collection element %d", i);
140 if ( ! wrap_geoms[i] ) {
142 lwnotice(
"Error wrapping geometry, cleaning up");
143 for (j = 0; j < i; j++)
145 lwnotice(
"cleaning geometry %d (%p)", j, wrap_geoms[j]);
162 lwcoll_in->
ngeoms, wrap_geoms);
void lwgeom_free(LWGEOM *geom)
LWCOLLECTION * lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
void * lwalloc(size_t size)
uint8_t MULTITYPE[NUMTYPES]
Look-up for the correct MULTI* type promotion for singleton types.
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
LWGEOM * lwgeom_wrapx(const LWGEOM *lwgeom_in, double cutx, double amount)
wrap geometry on given cut x value
References COLLECTIONTYPE, LWCOLLECTION::geoms, lwalloc(), lwcollection_construct(), LWDEBUGF, lwerror(), lwfree(), lwgeom_free(), lwgeom_wrapx(), lwnotice(), MULTITYPE, LWCOLLECTION::ngeoms, LWCOLLECTION::srid, LWCOLLECTION::type, and ovdump::type.
Referenced by lwgeom_split_wrapx(), and lwgeom_wrapx().