PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwgeom_extent_to_gml2()

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

Definition at line 198 of file lwout_gml.c.

References gbox_to_gml2(), and lwgeom_get_bbox().

Referenced by do_gml2_extent_test(), and LWGEOM_asGML().

199 {
200  const GBOX* bbox = lwgeom_get_bbox(geom);
201  /*
202  if ( ! bbox ) {
203  lwerror("lwgeom_extent_to_gml2: empty geometry doesn't have a bounding box");
204  return NULL;
205  }
206  */
207  char *ret = gbox_to_gml2(bbox, srs, precision, prefix);
208  return ret;
209 }
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:689
uint8_t precision
Definition: cu_in_twkb.c:25
static char * gbox_to_gml2(const GBOX *bbox, const char *srs, int precision, const char *prefix)
Definition: lwout_gml.c:75
Here is the call graph for this function:
Here is the caller graph for this function: