879{
880 uint32_t i;
881 uint8_t *loc;
882 int ptsize;
884
885 assert(poly);
886 assert(buf);
887
889
891 loc = buf;
892
893
894 memcpy(loc, &type, sizeof(uint32_t));
895 loc += sizeof(uint32_t);
896
897
898 memcpy(loc, &(poly->
nrings),
sizeof(uint32_t));
899 loc += sizeof(uint32_t);
900
901
902 for (i = 0; i < poly->
nrings; i++)
903 {
904 memcpy(loc, &(poly->
rings[i]->
npoints),
sizeof(uint32_t));
905 loc += sizeof(uint32_t);
906 }
907
908
910 {
911 memset(loc, 0, sizeof(uint32_t));
912 loc += sizeof(uint32_t);
913 }
914
915
916 for (i = 0; i < poly->
nrings; i++)
917 {
919 size_t pasize;
920
922 lwerror(
"Dimensions mismatch in lwpoly");
923
924 pasize = (size_t)pa->
npoints * ptsize;
927 loc += pasize;
928 }
929 return (size_t)(loc - buf);
930}
#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)