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

◆ printPA()

void printPA ( POINTARRAY pa)

Definition at line 447 of file lwgeom_api.c.

448{
449 uint32_t t;
450 POINT4D pt;
451 char *mflag;
452
453
454 if ( FLAGS_GET_M(pa->flags) ) mflag = "M";
455 else mflag = "";
456
457 lwnotice(" POINTARRAY%s{", mflag);
458 lwnotice(" ndims=%i, ptsize=%i",
460 lwnotice(" npoints = %i", pa->npoints);
461
462 if (!pa)
463 {
464 lwnotice(" PTARRAY is null pointer!");
465 }
466 else
467 {
468
469 for (t = 0; t < pa->npoints; t++)
470 {
471 getPoint4d_p(pa, t, &pt);
472 if (FLAGS_NDIMS(pa->flags) == 2)
473 lwnotice(" %i : %lf,%lf", t, pt.x, pt.y);
474 if (FLAGS_NDIMS(pa->flags) == 3)
475 lwnotice(" %i : %lf,%lf,%lf", t, pt.x, pt.y, pt.z);
476 if (FLAGS_NDIMS(pa->flags) == 4)
477 lwnotice(" %i : %lf,%lf,%lf,%lf", t, pt.x, pt.y, pt.z, pt.m);
478 }
479 }
480 lwnotice(" }");
481}
#define FLAGS_NDIMS(flags)
Definition liblwgeom.h:193
#define FLAGS_GET_M(flags)
Definition liblwgeom.h:180
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *op)
Definition lwgeom_api.c:125
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
Definition lwutil.c:177
static size_t ptarray_point_size(const POINTARRAY *pa)
Definition lwinline.h:48
double m
Definition liblwgeom.h:400
double x
Definition liblwgeom.h:400
double z
Definition liblwgeom.h:400
double y
Definition liblwgeom.h:400
lwflags_t flags
Definition liblwgeom.h:417
uint32_t npoints
Definition liblwgeom.h:413

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: