PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ gserialized2_fast_gbox_p()

int gserialized2_fast_gbox_p ( const GSERIALIZED g,
GBOX box 
)

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

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

Definition at line 611 of file gserialized2.c.

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

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: