1452{
1454 uint8_t *start_ptr = data_ptr;
1456 uint32_t ngeoms = 0;
1457 uint32_t i = 0;
1458
1459 assert(data_ptr);
1460
1462 data_ptr += 4;
1463
1466 collection->
bbox = NULL;
1469
1471 collection->
ngeoms = ngeoms;
1472 data_ptr += 4;
1473
1474 if (ngeoms > 0)
1475 {
1478 }
1479 else
1480 {
1481 collection->
geoms = NULL;
1483 }
1484
1485
1487
1488 for (i = 0; i < ngeoms; i++)
1489 {
1491 size_t subsize = 0;
1492
1494 {
1497 return NULL;
1498 }
1500 data_ptr += subsize;
1501 }
1502
1503 if (size)
1504 *size = data_ptr - start_ptr;
1505
1506 return collection;
1507}
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)
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.