PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t asgeojson_multipoint_size ( const LWMPOINT mpoint,
char *  srs,
GBOX bbox,
int  precision 
)
static

Multipoint Geometry.

Definition at line 316 of file lwout_geojson.c.

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

Referenced by asgeojson_geom_size(), and asgeojson_multipoint().

317 {
318  LWPOINT * point;
319  int size;
320  int i;
321 
322  size = sizeof("{'type':'MultiPoint',");
323  if (srs) size += asgeojson_srs_size(srs);
324  if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(mpoint->flags), precision);
325  size += sizeof("'coordinates':[]}");
326 
327  for (i=0; i<mpoint->ngeoms; i++)
328  {
329  point = mpoint->geoms[i];
330  size += pointArray_geojson_size(point->point, precision);
331  }
332  size += sizeof(",") * i;
333 
334  return size;
335 }
uint8_t flags
Definition: liblwgeom.h:421
static size_t asgeojson_bbox_size(int hasz, int precision)
Handle Bbox.
POINTARRAY * point
Definition: liblwgeom.h:367
LWPOINT ** geoms
Definition: liblwgeom.h:426
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:106
static size_t asgeojson_srs_size(char *srs)
Handle SRS.
Definition: lwout_geojson.c:82
int ngeoms
Definition: liblwgeom.h:424
static size_t pointArray_geojson_size(POINTARRAY *pa, int precision)
Returns maximum size of rendered pointarray in bytes.

Here is the call graph for this function:

Here is the caller graph for this function: