PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ printPA()

void printPA ( POINTARRAY pa)
extern

Definition at line 440 of file lwgeom_api.c.

441{
442 uint32_t t;
443 POINT4D pt;
444 char *mflag;
445
446 if (!pa)
447 {
448 lwnotice(" PTARRAY is null pointer!");
449 return;
450 }
451 if ( FLAGS_GET_M(pa->flags) ) mflag = "M";
452 else mflag = "";
453
454 lwnotice(" POINTARRAY%s{", mflag);
455 lwnotice(" ndims=%i, ptsize=%zu",
457 lwnotice(" npoints = %u", pa->npoints);
458
459 for (t = 0; t < pa->npoints; t++)
460 {
461 getPoint4d_p(pa, t, &pt);
462 if (FLAGS_NDIMS(pa->flags) == 2)
463 lwnotice(" %i : %lf,%lf", t, pt.x, pt.y);
464 if (FLAGS_NDIMS(pa->flags) == 3)
465 lwnotice(" %i : %lf,%lf,%lf", t, pt.x, pt.y, pt.z);
466 if (FLAGS_NDIMS(pa->flags) == 4)
467 lwnotice(" %i : %lf,%lf,%lf,%lf", t, pt.x, pt.y, pt.z, pt.m);
468 }
469
470 lwnotice(" }");
471}
#define FLAGS_NDIMS(flags)
Definition liblwgeom.h:179
#define FLAGS_GET_M(flags)
Definition liblwgeom.h:166
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *op)
Definition lwgeom_api.c:125
void lwnotice(const char *fmt,...) __attribute__((format(printf
Write a notice out to the notice handler.
static size_t ptarray_point_size(const POINTARRAY *pa)
Definition lwinline.h:56
double m
Definition liblwgeom.h:414
double x
Definition liblwgeom.h:414
double z
Definition liblwgeom.h:414
double y
Definition liblwgeom.h:414
lwflags_t flags
Definition liblwgeom.h:431
uint32_t npoints
Definition liblwgeom.h:427

References POINTARRAY::flags, FLAGS_GET_M, FLAGS_NDIMS, getPoint4d_p(), lwnotice(), POINT4D::m, POINTARRAY::npoints, ptarray_point_size(), POINT4D::x, POINT4D::y, and POINT4D::z.

Referenced by printLWCIRCSTRING(), printLWLINE(), printLWPOINT(), printLWPOLY(), printLWPSURFACE(), printLWTIN(), and printLWTRIANGLE().

Here is the call graph for this function:
Here is the caller graph for this function: