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