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

◆ asgeojson_line_size()

static size_t asgeojson_line_size ( const LWLINE line,
char *  srs,
GBOX bbox,
int  precision 
)
static

Line Geometry.

Definition at line 271 of file lwout_geojson.c.

272{
273 int size;
274
275 size = sizeof("{'type':'LineString',");
276 if (srs) size += asgeojson_srs_size(srs);
277 if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(line->flags), precision);
278 size += sizeof("'coordinates':[]}");
280
281 return size;
282}
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:471
POINTARRAY * points
Definition liblwgeom.h:469

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

Referenced by asgeojson_geom_size(), and asgeojson_line().

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