PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ asgeojson_multipoint_size()

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

Multipoint Geometry.

Definition at line 329 of file lwout_geojson.c.

330 {
331  LWPOINT * point;
332  int size;
333  uint32_t i;
334 
335  size = sizeof("{'type':'MultiPoint',");
336  if (srs) size += asgeojson_srs_size(srs);
337  if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(mpoint->flags), precision);
338  size += sizeof("'coordinates':[]}");
339 
340  for (i=0; i<mpoint->ngeoms; i++)
341  {
342  point = mpoint->geoms[i];
343  size += pointArray_geojson_size(point->point, precision);
344  }
345  size += sizeof(",") * i;
346 
347  return size;
348 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:140
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.
Definition: lwout_geojson.c:95
static size_t asgeojson_bbox_size(int hasz, int precision)
Handle Bbox.
uint8_t flags
Definition: liblwgeom.h:468
uint32_t ngeoms
Definition: liblwgeom.h:471
LWPOINT ** geoms
Definition: liblwgeom.h:473
POINTARRAY * point
Definition: liblwgeom.h:414
unsigned int uint32_t
Definition: uthash.h:78

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: