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

◆ pointArray_geojson_size()

static size_t pointArray_geojson_size ( POINTARRAY pa,
int  precision 
)
static

Returns maximum size of rendered pointarray in bytes.

Definition at line 776 of file lwout_geojson.c.

777{
779 if (FLAGS_NDIMS(pa->flags) == 2)
780 return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(","))
781 * 2 * pa->npoints + sizeof(",[]");
782
783 return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(",,"))
784 * 3 * pa->npoints + sizeof(",[]");
785}
static uint8_t precision
Definition cu_in_twkb.c:25
#define FLAGS_NDIMS(flags)
Definition liblwgeom.h:193
#define OUT_MAX_DIGS_DOUBLE
#define OUT_MAX_DOUBLE_PRECISION
lwflags_t flags
Definition liblwgeom.h:417
uint32_t npoints
Definition liblwgeom.h:413

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

Referenced by asgeojson_line_size(), asgeojson_multiline_size(), asgeojson_multipoint_size(), asgeojson_multipolygon_size(), asgeojson_point_size(), asgeojson_poly_size(), and asgeojson_triangle_size().

Here is the caller graph for this function: