PostGIS  2.2.7dev-r@@SVN_REVISION@@
static size_t asgeojson_multiline_size ( const LWMLINE mline,
char *  srs,
GBOX bbox,
int  precision 
)
static

Multiline Geometry.

Definition at line 379 of file lwout_geojson.c.

References asgeojson_bbox_size(), asgeojson_srs_size(), LWMLINE::flags, FLAGS_GET_Z, LWMLINE::geoms, LWMLINE::ngeoms, pointArray_geojson_size(), and LWLINE::points.

Referenced by asgeojson_geom_size(), and asgeojson_multiline().

380 {
381  LWLINE * line;
382  int size;
383  int i;
384 
385  size = sizeof("{'type':'MultiLineString',");
386  if (srs) size += asgeojson_srs_size(srs);
387  if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(mline->flags), precision);
388  size += sizeof("'coordinates':[]}");
389 
390  for (i=0 ; i<mline->ngeoms; i++)
391  {
392  line = mline->geoms[i];
393  size += pointArray_geojson_size(line->points, precision);
394  size += sizeof("[]");
395  }
396  size += sizeof(",") * i;
397 
398  return size;
399 }
static size_t asgeojson_bbox_size(int hasz, int precision)
Handle Bbox.
int ngeoms
Definition: liblwgeom.h:465
uint8_t flags
Definition: liblwgeom.h:462
uint8_t precision
Definition: cu_in_twkb.c:25
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:124
LWLINE ** geoms
Definition: liblwgeom.h:467
static size_t asgeojson_srs_size(char *srs)
Handle SRS.
Definition: lwout_geojson.c:81
static size_t pointArray_geojson_size(POINTARRAY *pa, int precision)
Returns maximum size of rendered pointarray in bytes.
POINTARRAY * points
Definition: liblwgeom.h:406

Here is the call graph for this function:

Here is the caller graph for this function: