PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ lwgeom_extent_to_gml2()

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

Definition at line 1063 of file lwout_gml.c.

1064 {
1065  const GBOX* bbox = lwgeom_get_bbox(geom);
1066  stringbuffer_t sb;
1067 
1068  /* Initialize options */
1069  GML_Options gmlopts;
1070  memset(&gmlopts, 0, sizeof(gmlopts));
1071  gmlopts.srs = srs;
1072  gmlopts.precision = precision;
1073  gmlopts.prefix = prefix;
1074 
1076  asgml2_gbox(&sb, bbox, &gmlopts);
1077  return stringbuffer_getvarlena(&sb);
1078 }
static uint8_t precision
Definition: cu_in_twkb.c:25
const GBOX * lwgeom_get_bbox(const LWGEOM *lwgeom)
Get a non-empty geometry bounding box, computing and caching it if not already there.
Definition: lwgeom.c:743
static void asgml2_gbox(stringbuffer_t *sb, const GBOX *bbox, const GML_Options *opts)
Definition: lwout_gml.c:82
lwvarlena_t * stringbuffer_getvarlena(stringbuffer_t *s)
Definition: stringbuffer.c:143
void stringbuffer_init_varlena(stringbuffer_t *s)
Definition: stringbuffer.c:60
const char * srs
Definition: lwout_gml.c:41
int precision
Definition: lwout_gml.c:42
const char * prefix
Definition: lwout_gml.c:45

References asgml2_gbox(), lwgeom_get_bbox(), precision, GML_Options::precision, GML_Options::prefix, GML_Options::srs, stringbuffer_getvarlena(), and stringbuffer_init_varlena().

Referenced by do_gml2_extent_test(), and LWGEOM_asGML().

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