1346{
1348 uint8_t *start_ptr = data_ptr;
1350 uint32_t ngeoms = 0;
1351 uint32_t i = 0;
1352
1353 assert(data_ptr);
1354
1356 data_ptr += 4;
1357
1360 collection->
bbox = NULL;
1363
1365 collection->
ngeoms = ngeoms;
1366 data_ptr += 4;
1367
1368 if ( ngeoms > 0 )
1369 {
1372 }
1373 else
1374 {
1375 collection->
geoms = NULL;
1377 }
1378
1379
1381
1382 for ( i = 0; i < ngeoms; i++ )
1383 {
1385 size_t subsize = 0;
1386
1388 {
1391 return NULL;
1392 }
1394 data_ptr += subsize;
1395 }
1396
1397 if ( size )
1398 *size = data_ptr - start_ptr;
1399
1400 return collection;
1401}
static LWGEOM * lwgeom_from_gserialized1_buffer(uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
static uint32_t gserialized1_get_uint32_t(const uint8_t *loc)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define FLAGS_SET_BBOX(flags, value)
void * lwalloc(size_t size)
lwflags_t lwflags(int hasz, int hasm, int geodetic)
Construct a new flags bitmask.
#define SRID_UNKNOWN
Unknown SRID value.
int lwcollection_allows_subtype(int collectiontype, int subtype)
Check if subtype is allowed in collectiontype.
void lwerror(const char *fmt,...)
Write a notice out to the error handler.