164{
168 int index = PG_GETARG_INT32(1);
170 if (!lwcmp)
171 PG_RETURN_NULL();
172 if (index < 1 || (uint32_t)index > lwcmp->
ngeoms)
173 PG_RETURN_NULL();
175 ret = geometry_serialize(subgeom);
176 PG_FREE_IF_COPY(geom, 0);
177 PG_RETURN_POINTER(ret);
178}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
const LWGEOM * lwcollection_getsubcurve(const LWCOMPOUND *compound, uint32_t gnum)
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
LWCOMPOUND * lwgeom_as_lwcompound(const LWGEOM *lwgeom)