PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ asgeojson_point_size()

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

Point Geometry.

Definition at line 169 of file lwout_geojson.c.

170{
171 int size;
172
174 size += sizeof("{'type':'Point',");
175 size += sizeof("'coordinates':}");
176
177 if ( lwpoint_is_empty(point) )
178 size += 2; /* [] */
179
180 if (srs) size += asgeojson_srs_size(srs);
181 if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(point->flags), precision);
182
183 return size;
184}
static uint8_t precision
Definition cu_in_twkb.c:25
#define FLAGS_GET_Z(flags)
Definition liblwgeom.h:179
int lwpoint_is_empty(const LWPOINT *point)
static size_t pointArray_geojson_size(POINTARRAY *pa, int precision)
Returns maximum size of rendered pointarray in bytes.
static size_t asgeojson_srs_size(char *srs)
Handle SRS.
static size_t asgeojson_bbox_size(int hasz, int precision)
Handle Bbox.
POINTARRAY * point
Definition liblwgeom.h:457
lwflags_t flags
Definition liblwgeom.h:459

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_geom_size(), and asgeojson_point().

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