818{
819 uint32_t i;
820 uint8_t *loc;
821 int ptsize;
823
824 assert(poly);
825 assert(buf);
826
828
830 loc = buf;
831
832
833 memcpy(loc, &type, sizeof(uint32_t));
834 loc += sizeof(uint32_t);
835
836
837 memcpy(loc, &(poly->
nrings),
sizeof(uint32_t));
838 loc += sizeof(uint32_t);
839
840
841 for ( i = 0; i < poly->
nrings; i++ )
842 {
843 memcpy(loc, &(poly->
rings[i]->
npoints),
sizeof(uint32_t));
844 loc += sizeof(uint32_t);
845 }
846
847
849 {
850 memset(loc, 0, sizeof(uint32_t));
851 loc += sizeof(uint32_t);
852 }
853
854
855 for ( i = 0; i < poly->
nrings; i++ )
856 {
858 size_t pasize;
859
861 lwerror(
"Dimensions mismatch in lwpoly");
862
866 loc += pasize;
867 }
868 return (size_t)(loc - buf);
869}
#define FLAGS_NDIMS(flags)
#define FLAGS_GET_ZM(flags)
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static uint8_t * getPoint_internal(const POINTARRAY *pa, uint32_t n)