411 double *xpts, *ypts, *zpts, *mpts;
413 int *shpparts, shppointtotal = 0, shppoint = 0;
416 shpparts =
malloc(
sizeof(
int) * lwmultilinestring->
ngeoms);
419 for (i = 0; i < lwmultilinestring->
ngeoms; i++)
422 LWDEBUGF(3,
"Total number of points: %d", shppointtotal);
425 xpts =
malloc(
sizeof(
double) * shppointtotal);
426 ypts =
malloc(
sizeof(
double) * shppointtotal);
427 zpts =
malloc(
sizeof(
double) * shppointtotal);
428 mpts =
malloc(
sizeof(
double) * shppointtotal);
431 for (i = 0; i < lwmultilinestring->
ngeoms; i++)
434 shpparts[i] = shppoint;
440 xpts[shppoint] = p4d.
x;
441 ypts[shppoint] = p4d.
y;
442 zpts[shppoint] = p4d.
z;
443 mpts[shppoint] = p4d.
m;
445 LWDEBUGF(4,
"Linestring %d - Point: %g %g %g %g", i, xpts[shppoint], ypts[shppoint], zpts[shppoint], mpts[shppoint]);
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