PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ asgeojson_point_size()

static size_t asgeojson_point_size ( const LWPOINT point,
const char *  srs,
GBOX bbox,
int  precision 
)
static

Point Geometry.

Definition at line 167 of file lwout_geojson.c.

168 {
169  int size;
170 
171  size = pointArray_geojson_size(point->point, precision);
172  size += sizeof("{'type':'Point',");
173  size += sizeof("'coordinates':}");
174 
175  if ( lwpoint_is_empty(point) )
176  size += 2; /* [] */
177 
178  if (srs) size += asgeojson_srs_size(srs);
179  if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(point->flags), precision);
180 
181  return size;
182 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define FLAGS_GET_Z(flags)
Definition: liblwgeom.h:180
int lwpoint_is_empty(const LWPOINT *point)
static size_t pointArray_geojson_size(POINTARRAY *pa, int precision)
static size_t asgeojson_srs_size(const char *srs)
Handle SRS.
Definition: lwout_geojson.c:97
static size_t asgeojson_bbox_size(int hasz, int precision)
Handle Bbox.
POINTARRAY * point
Definition: liblwgeom.h:486
lwflags_t flags
Definition: liblwgeom.h:488

References asgeojson_bbox_size(), asgeojson_srs_size(), LWPOINT::flags, FLAGS_GET_Z, lwpoint_is_empty(), LWPOINT::point, pointArray_geojson_size(), and precision.

Referenced by asgeojson_point().

Here is the call graph for this function:
Here is the caller graph for this function: