PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t asgeojson_bbox_buf ( char *  output,
GBOX bbox,
int  hasz,
int  precision 
)
static

Definition at line 129 of file lwout_geojson.c.

References GBOX::xmax, GBOX::xmin, GBOX::ymax, GBOX::ymin, GBOX::zmax, and GBOX::zmin.

Referenced by asgeojson_collection_buf(), asgeojson_line_buf(), asgeojson_multiline_buf(), asgeojson_multipoint_buf(), asgeojson_multipolygon_buf(), asgeojson_point_buf(), and asgeojson_poly_buf().

130 {
131  char *ptr = output;
132 
133  if (!hasz)
134  ptr += sprintf(ptr, "\"bbox\":[%.*f,%.*f,%.*f,%.*f],",
135  precision, bbox->xmin, precision, bbox->ymin,
136  precision, bbox->xmax, precision, bbox->ymax);
137  else
138  ptr += sprintf(ptr, "\"bbox\":[%.*f,%.*f,%.*f,%.*f,%.*f,%.*f],",
139  precision, bbox->xmin, precision, bbox->ymin, precision, bbox->zmin,
140  precision, bbox->xmax, precision, bbox->ymax, precision, bbox->zmax);
141 
142  return (ptr-output);
143 }
double xmax
Definition: liblwgeom.h:249
double zmax
Definition: liblwgeom.h:253
double ymin
Definition: liblwgeom.h:250
double xmin
Definition: liblwgeom.h:248
double ymax
Definition: liblwgeom.h:251
double zmin
Definition: liblwgeom.h:252

Here is the caller graph for this function: