PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ asgeojson_bbox_size()

static size_t asgeojson_bbox_size ( int  hasz,
int  precision 
)
static

Handle Bbox.

Definition at line 109 of file lwout_geojson.c.

References OUT_MAX_DIGS_DOUBLE, and precision.

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

110 {
111  int size;
112 
113  if (!hasz)
114  {
115  size = sizeof("\"bbox\":[,,,],");
116  size += 2 * 2 * (OUT_MAX_DIGS_DOUBLE + precision);
117  }
118  else
119  {
120  size = sizeof("\"bbox\":[,,,,,],");
121  size += 2 * 3 * (OUT_MAX_DIGS_DOUBLE + precision);
122  }
123 
124  return size;
125 }
uint8_t precision
Definition: cu_in_twkb.c:25
#define OUT_MAX_DIGS_DOUBLE
Here is the caller graph for this function: