PostGIS  3.4.0dev-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 558 of file gserialized1.c.

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

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: