PostGIS  2.1.10dev-r@@SVN_REVISION@@
void printPA ( POINTARRAY pa)

Definition at line 563 of file lwgeom_api.c.

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().

564 {
565  int t;
566  POINT4D pt;
567  char *mflag;
568 
569 
570  if ( FLAGS_GET_M(pa->flags) ) mflag = "M";
571  else mflag = "";
572 
573  lwnotice(" POINTARRAY%s{", mflag);
574  lwnotice(" ndims=%i, ptsize=%i",
576  lwnotice(" npoints = %i", pa->npoints);
577 
578  for (t =0; t<pa->npoints; t++)
579  {
580  getPoint4d_p(pa, t, &pt);
581  if (FLAGS_NDIMS(pa->flags) == 2)
582  {
583  lwnotice(" %i : %lf,%lf",t,pt.x,pt.y);
584  }
585  if (FLAGS_NDIMS(pa->flags) == 3)
586  {
587  lwnotice(" %i : %lf,%lf,%lf",t,pt.x,pt.y,pt.z);
588  }
589  if (FLAGS_NDIMS(pa->flags) == 4)
590  {
591  lwnotice(" %i : %lf,%lf,%lf,%lf",t,pt.x,pt.y,pt.z,pt.m);
592  }
593  }
594 
595  lwnotice(" }");
596 }
double x
Definition: liblwgeom.h:308
double m
Definition: liblwgeom.h:308
int npoints
Definition: liblwgeom.h:327
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
Definition: lwutil.c:54
uint8_t flags
Definition: liblwgeom.h:325
int ptarray_point_size(const POINTARRAY *pa)
Definition: ptarray.c:41
double z
Definition: liblwgeom.h:308
int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *op)
Definition: lwgeom_api.c:217
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:107
double y
Definition: liblwgeom.h:308
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:118

Here is the call graph for this function:

Here is the caller graph for this function: