1400{
1402 uint8_t *start_ptr = data_ptr;
1404 uint32_t ngeoms = 0;
1405 uint32_t i = 0;
1406
1407 assert(data_ptr);
1408
1410 data_ptr += 4;
1411
1413 collection->
srid = srid;
1414 collection->
bbox = NULL;
1417
1419 collection->
ngeoms = ngeoms;
1420 data_ptr += 4;
1421
1422 if (ngeoms > 0)
1423 {
1426 }
1427 else
1428 {
1429 collection->
geoms = NULL;
1431 }
1432
1433
1435
1436 for (i = 0; i < ngeoms; i++)
1437 {
1439 size_t subsize = 0;
1440
1442 {
1445 return NULL;
1446 }
1448 data_ptr += subsize;
1449 }
1450
1451 if (size)
1452 *size = data_ptr - start_ptr;
1453
1454 return collection;
1455}
static uint32_t gserialized2_get_uint32_t(const uint8_t *loc)
static LWGEOM * lwgeom_from_gserialized2_buffer(uint8_t *data_ptr, lwflags_t lwflags, size_t *size, int32_t srid)
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.
int lwcollection_allows_subtype(int collectiontype, int subtype)
Check if subtype is allowed in collectiontype.
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.