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

◆ asgeojson_multiline_size()

static size_t asgeojson_multiline_size ( const LWMLINE mline,
char *  srs,
GBOX bbox,
int  precision 
)
static

Multiline Geometry.

Definition at line 446 of file lwout_geojson.c.

447{
448 LWLINE * line;
449 int size;
450 uint32_t i;
451
452 size = sizeof("{'type':'MultiLineString',");
453 if (srs) size += asgeojson_srs_size(srs);
454 if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(mline->flags), precision);
455 size += sizeof("'coordinates':[]}");
456
457 for (i=0 ; i<mline->ngeoms; i++)
458 {
459 line = mline->geoms[i];
461 size += sizeof("[]");
462 }
463 size += sizeof(",") * i;
464
465 return size;
466}
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.
POINTARRAY * points
Definition liblwgeom.h:469
lwflags_t flags
Definition liblwgeom.h:535
LWLINE ** geoms
Definition liblwgeom.h:533
uint32_t ngeoms
Definition liblwgeom.h:538

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

Referenced by asgeojson_geom_size(), and asgeojson_multiline().

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