POINTARRAY Read a dynamically sized point array and advance the parse state forward.
Definition at line 172 of file lwin_twkb.c.
173{
175 uint32_t ndims =
s->ndims;
176 uint32_t i;
177 double *dlist;
178
179 LWDEBUG(2,
"Entering ptarray_from_twkb_state");
180 LWDEBUGF(4,
"Pointarray has %d points", npoints);
181
182
183 if( npoints == 0 )
185
188 for( i = 0; i < npoints; i++ )
189 {
190 int j = 0;
191
193 dlist[ndims*i + j] =
s->coords[j] /
s->factor;
194 j++;
195
197 dlist[ndims*i + j] =
s->coords[j] /
s->factor;
198 j++;
199
201 {
203 dlist[ndims*i + j] =
s->coords[j] /
s->factor_z;
204 j++;
205 }
206
208 {
210 dlist[ndims*i + j] =
s->coords[j] /
s->factor_m;
211 j++;
212 }
213 }
214
215 return pa;
216}
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
POINTARRAY * ptarray_construct(char hasz, char hasm, uint32_t npoints)
Construct an empty pointarray, allocating storage and setting the npoints, but not filling in any inf...
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
static int64_t twkb_parse_state_varint(twkb_parse_state *s)
uint8_t * serialized_pointlist
References LWDEBUG, LWDEBUGF, ptarray_construct(), ptarray_construct_empty(), s, POINTARRAY::serialized_pointlist, and twkb_parse_state_varint().
Referenced by lwline_from_twkb_state(), lwpoint_from_twkb_state(), and lwpoly_from_twkb_state().