PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ asgeojson_bbox_buf()

static size_t asgeojson_bbox_buf ( char *  output,
GBOX bbox,
int  hasz,
int  precision 
)
static

Definition at line 142 of file lwout_geojson.c.

143 {
144  char *ptr = output;
145 
146  if (!hasz)
147  ptr += sprintf(ptr, "\"bbox\":[%.*f,%.*f,%.*f,%.*f],",
148  precision, bbox->xmin, precision, bbox->ymin,
149  precision, bbox->xmax, precision, bbox->ymax);
150  else
151  ptr += sprintf(ptr, "\"bbox\":[%.*f,%.*f,%.*f,%.*f,%.*f,%.*f],",
152  precision, bbox->xmin, precision, bbox->ymin, precision, bbox->zmin,
153  precision, bbox->xmax, precision, bbox->ymax, precision, bbox->zmax);
154 
155  return (ptr-output);
156 }
static uint8_t precision
Definition: cu_in_twkb.c:25
double ymax
Definition: liblwgeom.h:298
double zmax
Definition: liblwgeom.h:300
double xmax
Definition: liblwgeom.h:296
double zmin
Definition: liblwgeom.h:299
double ymin
Definition: liblwgeom.h:297
double xmin
Definition: liblwgeom.h:295

References precision, 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().

Here is the caller graph for this function: