PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ pointArray_X3Dsize()

static size_t pointArray_X3Dsize ( POINTARRAY pa,
int  precision 
)
static

Returns maximum size of rendered pointarray in bytes.

Definition at line 930 of file lwout_x3d.c.

References POINTARRAY::flags, FLAGS_NDIMS, POINTARRAY::npoints, and OUT_MAX_DIGS_DOUBLE.

Referenced by asx3d3_line_size(), asx3d3_point_size(), asx3d3_poly_size(), and asx3d3_triangle_size().

931 {
932  if (FLAGS_NDIMS(pa->flags) == 2)
933  return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(" "))
934  * 2 * pa->npoints;
935 
936  return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(" ")) * 3 * pa->npoints;
937 }
int npoints
Definition: liblwgeom.h:371
uint8_t flags
Definition: liblwgeom.h:369
uint8_t precision
Definition: cu_in_twkb.c:25
#define OUT_MAX_DIGS_DOUBLE
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:152
Here is the caller graph for this function: