PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ asgeojson_triangle_size()

static size_t asgeojson_triangle_size ( const LWTRIANGLE tri,
char *  srs,
GBOX bbox,
int  precision 
)
static

Triangle Geometry.

Definition at line 221 of file lwout_geojson.c.

222 {
223  int size;
224 
225  size = sizeof("{'type':'Polygon',");
226  if (srs)
227  size += asgeojson_srs_size(srs);
228  if (bbox)
230  size += sizeof("'coordinates':[[]]}");
232 
233  return size;
234 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define FLAGS_GET_Z(flags)
Definition: liblwgeom.h:179
static size_t pointArray_geojson_size(POINTARRAY *pa, int precision)
static size_t asgeojson_srs_size(char *srs)
Handle SRS.
Definition: lwout_geojson.c:99
static size_t asgeojson_bbox_size(int hasz, int precision)
Handle Bbox.
lwflags_t flags
Definition: liblwgeom.h:483
POINTARRAY * points
Definition: liblwgeom.h:481

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

Here is the call graph for this function: