PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized1_fast_gbox_p()

int gserialized1_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 557 of file gserialized1.c.

558 {
559  /* Try to just read the serialized box. */
560  if ( gserialized1_read_gbox_p(g, box) == LW_SUCCESS )
561  {
562  return LW_SUCCESS;
563  }
564  /* No box? Try to peek into simpler geometries and */
565  /* derive a box without creating an lwgeom */
566  else if ( gserialized1_peek_gbox_p(g, box) == LW_SUCCESS )
567  {
568  return LW_SUCCESS;
569  }
570  else
571  {
572  return LW_FAILURE;
573  }
574 }
int gserialized1_peek_gbox_p(const GSERIALIZED *g, GBOX *gbox)
Definition: gserialized1.c:298
static int gserialized1_read_gbox_p(const GSERIALIZED *g, GBOX *gbox)
Definition: gserialized1.c:251
#define LW_FAILURE
Definition: liblwgeom.h:110
#define LW_SUCCESS
Definition: liblwgeom.h:111

References gserialized1_peek_gbox_p(), gserialized1_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: