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

◆ lwgeom_to_x3d3()

lwvarlena_t * lwgeom_to_x3d3 ( const LWGEOM geom,
int  precision,
int  opts,
const char *  defid 
)

Definition at line 37 of file lwout_x3d.c.

38{
40 int rv;
41
42 /* Empty varlena for empties */
43 if( lwgeom_is_empty(geom) )
44 {
47 return v;
48 }
49
51 rv = lwgeom_to_x3d3_sb(geom, precision, opts, defid, sb);
52
53 if ( rv == LW_FAILURE )
54 {
56 return NULL;
57 }
58
61
62 return v;
63}
static uint8_t precision
Definition cu_in_twkb.c:25
#define LWVARHDRSZ
Definition liblwgeom.h:311
#define LW_FAILURE
Definition liblwgeom.h:96
void * lwalloc(size_t size)
Definition lwutil.c:227
#define LWSIZE_SET(varsize, len)
Definition liblwgeom.h:325
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
Definition lwinline.h:199
static int lwgeom_to_x3d3_sb(const LWGEOM *geom, int precision, int opts, const char *defid, stringbuffer_t *sb)
Definition lwout_x3d.c:66
stringbuffer_t * stringbuffer_create(void)
Allocate a new stringbuffer_t.
lwvarlena_t * stringbuffer_getvarlenacopy(stringbuffer_t *s)
void stringbuffer_destroy(stringbuffer_t *s)
Free the stringbuffer_t and all memory managed within it.
uint32_t size
Definition liblwgeom.h:307

References LW_FAILURE, lwalloc(), lwgeom_is_empty(), lwgeom_to_x3d3_sb(), LWSIZE_SET, LWVARHDRSZ, precision, lwvarlena_t::size, stringbuffer_create(), stringbuffer_destroy(), and stringbuffer_getvarlenacopy().

Referenced by do_x3d3_test(), do_x3d3_unsupported(), and LWGEOM_asX3D().

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