83 for (i = 0; i < col->
ngeoms; i++)
147 else if ( ntypes == 1 )
151 if ( outcol->
ngeoms == 1 )
153 outgeom = outcol->
geoms[0];
163 else if ( ntypes > 1 )
267 lwerror(
"lwgeom_homogenize: Geometry Type not supported (%i)",
GBOX * gbox_copy(const GBOX *box)
Return a copy of the GBOX, based on dimensionality of flags.
LWGEOM * lwcollection_as_lwgeom(const LWCOLLECTION *obj)
uint32_t lwtype_get_collectiontype(uint8_t type)
Given an lwtype number, what homogeneous collection can hold it?
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define FLAGS_GET_Z(flags)
int lwgeom_is_collection(const LWGEOM *lwgeom)
Determine whether a LWGEOM can contain sub-geometries or not.
#define POLYHEDRALSURFACETYPE
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int32_t srid, char hasz, char hasm)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define FLAGS_GET_M(flags)
void lwcollection_free(LWCOLLECTION *col)
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
LWCOLLECTION * lwcollection_add_lwgeom(LWCOLLECTION *col, const LWGEOM *geom)
Appends geom to the collection managed by col.
LWCOLLECTION * lwgeom_as_lwcollection(const LWGEOM *lwgeom)
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
int lwcollection_is_empty(const LWCOLLECTION *col)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static void lwcollection_build_buffer(const LWCOLLECTION *col, HomogenizeBuffer *buffer)
LWGEOM * lwgeom_homogenize(const LWGEOM *geom)
static LWGEOM * lwcollection_homogenize(const LWCOLLECTION *col)
static void init_homogenizebuffer(HomogenizeBuffer *buffer)
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
Datum buffer(PG_FUNCTION_ARGS)