PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ printPA()

void printPA ( POINTARRAY pa)

Definition at line 506 of file lwgeom_api.c.

507 {
508  uint32_t t;
509  POINT4D pt;
510  char *mflag;
511 
512 
513  if ( FLAGS_GET_M(pa->flags) ) mflag = "M";
514  else mflag = "";
515 
516  lwnotice(" POINTARRAY%s{", mflag);
517  lwnotice(" ndims=%i, ptsize=%i",
519  lwnotice(" npoints = %i", pa->npoints);
520 
521  for (t =0; t<pa->npoints; t++)
522  {
523  getPoint4d_p(pa, t, &pt);
524  if (FLAGS_NDIMS(pa->flags) == 2)
525  {
526  lwnotice(" %i : %lf,%lf",t,pt.x,pt.y);
527  }
528  if (FLAGS_NDIMS(pa->flags) == 3)
529  {
530  lwnotice(" %i : %lf,%lf,%lf",t,pt.x,pt.y,pt.z);
531  }
532  if (FLAGS_NDIMS(pa->flags) == 4)
533  {
534  lwnotice(" %i : %lf,%lf,%lf,%lf",t,pt.x,pt.y,pt.z,pt.m);
535  }
536  }
537 
538  lwnotice(" }");
539 }
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:152
size_t ptarray_point_size(const POINTARRAY *pa)
Definition: ptarray.c:54
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:141
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *op)
Definition: lwgeom_api.c:123
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
Definition: lwutil.c:177
double m
Definition: liblwgeom.h:355
double x
Definition: liblwgeom.h:355
double z
Definition: liblwgeom.h:355
double y
Definition: liblwgeom.h:355
uint32_t npoints
Definition: liblwgeom.h:374
uint8_t flags
Definition: liblwgeom.h:372
unsigned int uint32_t
Definition: uthash.h:78

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: