388{
391 uint32_t i, j;
392
393 double *xpts, *ypts, *zpts, *mpts;
394
395 int *shpparts, shppointtotal = 0, shppoint = 0;
396
397
398 shpparts =
malloc(
sizeof(
int) * lwmultilinestring->
ngeoms);
399
400
401 for (i = 0; i < lwmultilinestring->
ngeoms; i++)
403
404 LWDEBUGF(3,
"Total number of points: %d", shppointtotal);
405
406
407 xpts =
malloc(
sizeof(
double) * shppointtotal);
408 ypts =
malloc(
sizeof(
double) * shppointtotal);
409 zpts =
malloc(
sizeof(
double) * shppointtotal);
410 mpts =
malloc(
sizeof(
double) * shppointtotal);
411
412
413 for (i = 0; i < lwmultilinestring->
ngeoms; i++)
414 {
415
416 shpparts[i] = shppoint;
417
419 {
421
422 xpts[shppoint] = p4d.
x;
423 ypts[shppoint] = p4d.
y;
424 zpts[shppoint] = p4d.
z;
425 mpts[shppoint] = p4d.
m;
426
427 LWDEBUGF(4,
"Linestring %d - Point: %g %g %g %g", i, xpts[shppoint], ypts[shppoint], zpts[shppoint], mpts[shppoint]);
428
429
430 shppoint++;
431 }
432 }
433
435
440
441 return obj;
442}
POINT4D getPoint4d(const POINTARRAY *pa, uint32_t n)
#define LWDEBUGF(level, msg,...)
SHPObject SHPAPI_CALL1 * SHPCreateObject(int nSHPType, int nShapeId, int nParts, const int *panPartStart, const int *panPartType, int nVertices, const double *padfX, const double *padfY, const double *padfZ, const double *padfM);SHPObject SHPAPI_CALL1(*) SHPCreateSimpleObject(int nSHPType, int nVertices, const double *padfX, const double *padfY, const double *padfZ