409{
412 uint32_t i, j;
413
414 double *xpts, *ypts, *zpts, *mpts;
415
416 int *shpparts, shppointtotal = 0, shppoint = 0;
417
418
419 shpparts =
malloc(
sizeof(
int) * lwmultilinestring->
ngeoms);
420
421
422 for (i = 0; i < lwmultilinestring->
ngeoms; i++)
424
425 LWDEBUGF(3,
"Total number of points: %d", shppointtotal);
426
427
428 xpts =
malloc(
sizeof(
double) * shppointtotal);
429 ypts =
malloc(
sizeof(
double) * shppointtotal);
430 zpts =
malloc(
sizeof(
double) * shppointtotal);
431 mpts =
malloc(
sizeof(
double) * shppointtotal);
432
433
434 for (i = 0; i < lwmultilinestring->
ngeoms; i++)
435 {
436
437 shpparts[i] = shppoint;
438
440 {
442
443 xpts[shppoint] = p4d.
x;
444 ypts[shppoint] = p4d.
y;
445 zpts[shppoint] = p4d.
z;
446 mpts[shppoint] = p4d.
m;
447
448 LWDEBUGF(4,
"Linestring %d - Point: %g %g %g %g", i, xpts[shppoint], ypts[shppoint], zpts[shppoint], mpts[shppoint]);
449
450
451 shppoint++;
452 }
453 }
454
456
462
463 return obj;
464}
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