PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized_get_gbox_p()

int gserialized_get_gbox_p ( const GSERIALIZED g,
GBOX gbox 
)

Read the box from the GSERIALIZED or calculate it if necessary.

Pull a GBOX from the header of a GSERIALIZED, if one is available.

Return #LWFAILURE if box cannot be calculated (NULL or EMPTY input).

If it is not, calculate it from the geometry. If that doesn't work (null or empty) return LW_FAILURE.

Pull a GBOX from the header of a GSERIALIZED, if one is available.

Return #LWFAILURE if box cannot be calculated (NULL or EMPTY input).

If it is not, calculate it from the geometry. If that doesn't work (null or empty) return LW_FAILURE.

Definition at line 65 of file gserialized.c.

66 {
67  if (GFLAGS_GET_VERSION(g->gflags))
68  return gserialized2_get_gbox_p(g, gbox);
69  else
70  return gserialized1_get_gbox_p(g, gbox);
71 }
int gserialized1_get_gbox_p(const GSERIALIZED *g, GBOX *box)
Read the bounding box off a serialization and calculate one if it is not already there.
Definition: gserialized1.c:528
int gserialized2_get_gbox_p(const GSERIALIZED *g, GBOX *box)
Read the bounding box off a serialization and calculate one if it is not already there.
Definition: gserialized2.c:581
#define GFLAGS_GET_VERSION(gflags)
Definition: gserialized.c:12
uint8_t gflags
Definition: liblwgeom.h:432