43 buffer->
buf[i] = NULL;
82 for ( i = 0; i < col->
ngeoms; i++ )
96 if ( ! buffer->
buf[geom->
type] )
100 buffer->
buf[geom->
type] = bufcol;
133 if ( buffer.
cnt[i] > 0 )
148 else if ( ntypes == 1 )
152 if ( outcol->
ngeoms == 1 )
154 outgeom = outcol->
geoms[0];
164 else if ( ntypes > 1 )
268 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.
int lwtype_get_collectiontype(uint8_t type)
Given an lwtype number, what homogeneous collection can hold it?
int lwgeom_is_collection(const LWGEOM *lwgeom)
Determine whether a LWGEOM can contain sub-geometries or not.
#define POLYHEDRALSURFACETYPE
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
static void init_homogenizebuffer(HomogenizeBuffer *buffer)
Datum buffer(PG_FUNCTION_ARGS)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
static LWGEOM * lwcollection_homogenize(const LWCOLLECTION *col)
LWGEOM * lwgeom_homogenize(const LWGEOM *geom)
LWCOLLECTION * buf[NUMTYPES]
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
LWCOLLECTION * lwgeom_as_lwcollection(const LWGEOM *lwgeom)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define FLAGS_GET_M(flags)
void lwcollection_free(LWCOLLECTION *col)
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members) ...
static void lwcollection_build_buffer(const LWCOLLECTION *col, HomogenizeBuffer *buffer)
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int srid, char hasz, char hasm)
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
LWCOLLECTION * lwcollection_add_lwgeom(LWCOLLECTION *col, const LWGEOM *geom)
Appends geom to the collection managed by col.
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
LWGEOM * lwcollection_as_lwgeom(const LWCOLLECTION *obj)