PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ asgml2_line()

static lwvarlena_t * asgml2_line ( const LWLINE line,
const char *  srs,
int  precision,
const char *  prefix 
)
static

Definition at line 376 of file lwout_gml.c.

377 {
378  int size = asgml2_line_size(line, srs, precision, prefix);
379  lwvarlena_t *output = lwalloc(LWVARHDRSZ + size);
380  size = asgml2_line_buf(line, srs, output->data, precision, prefix);
381  LWSIZE_SET(output->size, size + LWVARHDRSZ);
382  return output;
383 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define LWVARHDRSZ
Definition: liblwgeom.h:325
#define LWSIZE_SET(varsize, len)
Definition: liblwgeom.h:339
void * lwalloc(size_t size)
Definition: lwutil.c:227
static size_t asgml2_line_size(const LWLINE *line, const char *srs, int precision, const char *prefix)
Definition: lwout_gml.c:341
static size_t asgml2_line_buf(const LWLINE *line, const char *srs, char *output, int precision, const char *prefix)
Definition: lwout_gml.c:353
uint32_t size
Definition: liblwgeom.h:321
char data[]
Definition: liblwgeom.h:322

References asgml2_line_buf(), asgml2_line_size(), lwvarlena_t::data, lwalloc(), LWSIZE_SET, LWVARHDRSZ, precision, and lwvarlena_t::size.

Referenced by lwgeom_to_gml2().

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