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

◆ lwgeom_to_kml2()

lwvarlena_t * lwgeom_to_kml2 ( const LWGEOM geom,
int  precision,
const char *  prefix 
)

Definition at line 44 of file lwout_kml.c.

45{
47 int rv;
48
49 /* Can't do anything with empty */
50 if( lwgeom_is_empty(geom) )
51 return NULL;
52
54 rv = lwgeom_to_kml2_sb(geom, precision, prefix, sb);
55
56 if ( rv == LW_FAILURE )
57 {
59 return NULL;
60 }
61
64
65 return v;
66}
static uint8_t precision
Definition cu_in_twkb.c:25
#define LW_FAILURE
Definition liblwgeom.h:96
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_kml2_sb(const LWGEOM *geom, int precision, const char *prefix, stringbuffer_t *sb)
Definition lwout_kml.c:69
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.

References LW_FAILURE, lwgeom_is_empty(), lwgeom_to_kml2_sb(), precision, stringbuffer_create(), stringbuffer_destroy(), and stringbuffer_getvarlenacopy().

Referenced by do_kml_test(), do_kml_test_prefix(), do_kml_unsupported(), geography_as_kml(), and LWGEOM_asKML().

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