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

◆ asgeojson_multipoint_size()

static size_t asgeojson_multipoint_size ( const LWMPOINT mpoint,
char *  srs,
GBOX bbox,
int  precision 
)
static

Multipoint Geometry.

Definition at line 382 of file lwout_geojson.c.

383{
384 LWPOINT * point;
385 int size;
386 uint32_t i;
387
388 size = sizeof("{'type':'MultiPoint',");
389 if (srs) size += asgeojson_srs_size(srs);
390 if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(mpoint->flags), precision);
391 size += sizeof("'coordinates':[]}");
392
393 for (i=0; i<mpoint->ngeoms; i++)
394 {
395 point = mpoint->geoms[i];
396 size += pointArray_geojson_size(point->point, precision);
397 }
398 size += sizeof(",") * i;
399
400 return size;
401}
static uint8_t precision
Definition cu_in_twkb.c:25
#define FLAGS_GET_Z(flags)
Definition liblwgeom.h:179
static size_t pointArray_geojson_size(POINTARRAY *pa, int precision)
Returns maximum size of rendered pointarray in bytes.
static size_t asgeojson_srs_size(char *srs)
Handle SRS.
static size_t asgeojson_bbox_size(int hasz, int precision)
Handle Bbox.
lwflags_t flags
Definition liblwgeom.h:521
uint32_t ngeoms
Definition liblwgeom.h:524
LWPOINT ** geoms
Definition liblwgeom.h:519
POINTARRAY * point
Definition liblwgeom.h:457

References asgeojson_bbox_size(), asgeojson_srs_size(), LWMPOINT::flags, FLAGS_GET_Z, LWMPOINT::geoms, LWMPOINT::ngeoms, LWPOINT::point, pointArray_geojson_size(), and precision.

Referenced by asgeojson_geom_size(), and asgeojson_multipoint().

Here is the call graph for this function:
Here is the caller graph for this function: