PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t asgeojson_bbox_size ( int  hasz,
int  precision 
)
static

Handle Bbox.

Definition at line 110 of file lwout_geojson.c.

References OUT_MAX_DIGS_DOUBLE.

Referenced by asgeojson_collection_size(), asgeojson_line_size(), asgeojson_multiline_size(), asgeojson_multipoint_size(), asgeojson_multipolygon_size(), asgeojson_point_size(), and asgeojson_poly_size().

111 {
112  int size;
113 
114  if (!hasz)
115  {
116  size = sizeof("\"bbox\":[,,,],");
117  size += 2 * 2 * (OUT_MAX_DIGS_DOUBLE + precision);
118  }
119  else
120  {
121  size = sizeof("\"bbox\":[,,,,,],");
122  size += 2 * 3 * (OUT_MAX_DIGS_DOUBLE + precision);
123  }
124 
125  return size;
126 }
#define OUT_MAX_DIGS_DOUBLE

Here is the caller graph for this function: