PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized2_fast_gbox_p()

int gserialized2_fast_gbox_p ( const GSERIALIZED g,
GBOX box 
)

Read the bounding box off a serialization and fail if it is not already there.

Read the box from the GSERIALIZED or return #LWFAILURE if box is unavailable.

Definition at line 610 of file gserialized2.c.

611 {
612  /* Try to just read the serialized box. */
613  if (gserialized2_read_gbox_p(g, box) == LW_SUCCESS)
614  {
615  return LW_SUCCESS;
616  }
617  /* No box? Try to peek into simpler geometries and */
618  /* derive a box without creating an lwgeom */
619  else if (gserialized2_peek_gbox_p(g, box) == LW_SUCCESS)
620  {
621  return LW_SUCCESS;
622  }
623  else
624  {
625  return LW_FAILURE;
626  }
627 }
static int gserialized2_read_gbox_p(const GSERIALIZED *g, GBOX *gbox)
Definition: gserialized2.c:313
int gserialized2_peek_gbox_p(const GSERIALIZED *g, GBOX *gbox)
Definition: gserialized2.c:360
#define LW_FAILURE
Definition: liblwgeom.h:110
#define LW_SUCCESS
Definition: liblwgeom.h:111

References gserialized2_peek_gbox_p(), gserialized2_read_gbox_p(), LW_FAILURE, and LW_SUCCESS.

Referenced by gserialized_fast_gbox_p().

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