PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ lwgeom_extent_to_gml3()

lwvarlena_t* lwgeom_extent_to_gml3 ( const LWGEOM geom,
const char *  srs,
int  precision,
int  opts,
const char *  prefix 
)
Parameters
optsoutput options bitfield, see LW_GML macros for meaning

Definition at line 1081 of file lwout_gml.c.

1082 {
1083  const GBOX* bbox = lwgeom_get_bbox(geom);
1084  stringbuffer_t sb;
1085 
1086  /* Initialize options */
1087  GML_Options gmlopts;
1088  memset(&gmlopts, 0, sizeof(gmlopts));
1089  gmlopts.srs = srs;
1090  gmlopts.precision = precision;
1091  gmlopts.opts = opts;
1092  gmlopts.prefix = prefix;
1093 
1095  asgml3_gbox(&sb, bbox, &gmlopts);
1096  return stringbuffer_getvarlena(&sb);
1097 }
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 asgml3_gbox(stringbuffer_t *sb, const GBOX *bbox, const GML_Options *opts)
Definition: lwout_gml.c:163
opts
Definition: ovdump.py:45
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 asgml3_gbox(), lwgeom_get_bbox(), GML_Options::opts, ovdump::opts, precision, GML_Options::precision, GML_Options::prefix, GML_Options::srs, stringbuffer_getvarlena(), and stringbuffer_init_varlena().

Referenced by do_gml3_extent_test(), and LWGEOM_asGML().

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