PostGIS  2.2.7dev-r@@SVN_REVISION@@
static size_t asgeojson_line_size ( const LWLINE line,
char *  srs,
GBOX bbox,
int  precision 
)
static

Line Geometry.

Definition at line 205 of file lwout_geojson.c.

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

Referenced by asgeojson_geom_size(), and asgeojson_line().

206 {
207  int size;
208 
209  size = sizeof("{'type':'LineString',");
210  if (srs) size += asgeojson_srs_size(srs);
211  if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(line->flags), precision);
212  size += sizeof("'coordinates':[]}");
213  size += pointArray_geojson_size(line->points, precision);
214 
215  return size;
216 }
static size_t asgeojson_bbox_size(int hasz, int precision)
Handle Bbox.
uint8_t precision
Definition: cu_in_twkb.c:25
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:124
static size_t asgeojson_srs_size(char *srs)
Handle SRS.
Definition: lwout_geojson.c:81
uint8_t flags
Definition: liblwgeom.h:403
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: