Definition at line 662 of file g_serialized.c.
References POINTARRAY::flags, LWPOLY::flags, FLAGS_GET_ZM, FLAGS_NDIMS, getPoint_internal(), LWDEBUG, lwerror(), POINTARRAY::npoints, LWPOLY::nrings, POLYGONTYPE, LWPOLY::rings, and ovdump::type.
Referenced by gserialized_from_lwgeom_any().
672 LWDEBUG(2,
"lwpoly_to_gserialized called");
678 memcpy(loc, &type,
sizeof(uint32_t));
679 loc +=
sizeof(uint32_t);
682 memcpy(loc, &(poly->
nrings),
sizeof(uint32_t));
683 loc +=
sizeof(uint32_t);
686 for ( i = 0; i < poly->
nrings; i++ )
688 memcpy(loc, &(poly->
rings[i]->
npoints),
sizeof(uint32_t));
689 loc +=
sizeof(uint32_t);
695 memset(loc, 0,
sizeof(uint32_t));
696 loc +=
sizeof(uint32_t);
700 for ( i = 0; i < poly->
nrings; i++ )
706 lwerror(
"Dimensions mismatch in lwpoly");
712 return (
size_t)(loc - buf);
#define FLAGS_GET_ZM(flags)
#define LWDEBUG(level, msg)
uint8_t * getPoint_internal(const POINTARRAY *pa, int n)
#define FLAGS_NDIMS(flags)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.