PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ asgeojson_point()

static lwvarlena_t * asgeojson_point ( const LWPOINT point,
const char *  srs,
GBOX bbox,
int  precision 
)
static

Definition at line 203 of file lwout_geojson.c.

204 {
205  uint32_t size = asgeojson_point_size(point, srs, bbox, precision);
206  lwvarlena_t *output = (lwvarlena_t *)lwalloc(size + LWVARHDRSZ);
207  size = asgeojson_point_buf(point, srs, output->data, bbox, precision);
208  LWSIZE_SET(output->size, size + LWVARHDRSZ);
209  return output;
210 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define LWVARHDRSZ
Definition: liblwgeom.h:326
#define LWSIZE_SET(varsize, len)
Definition: liblwgeom.h:340
void * lwalloc(size_t size)
Definition: lwutil.c:227
static size_t asgeojson_point_buf(const LWPOINT *point, const char *srs, char *output, GBOX *bbox, int precision)
static size_t asgeojson_point_size(const LWPOINT *point, const char *srs, GBOX *bbox, int precision)
Point Geometry.
uint32_t size
Definition: liblwgeom.h:322
char data[]
Definition: liblwgeom.h:323

References asgeojson_point_buf(), asgeojson_point_size(), lwvarlena_t::data, lwalloc(), LWSIZE_SET, LWVARHDRSZ, precision, and lwvarlena_t::size.

Referenced by lwgeom_to_geojson().

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