PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ box2df_contains()

bool box2df_contains ( const BOX2DF *  a,
const BOX2DF *  b 
)

Definition at line 369 of file gserialized_gist_2d.c.

References box2df_is_empty().

Referenced by box2df_within(), geom2d_brin_inclusion_add_value(), gserialized_contains_2d(), gserialized_contains_box2df_box2df_2d(), gserialized_contains_box2df_geom_2d(), gserialized_gist_consistent_internal_2d(), gserialized_gist_consistent_leaf_2d(), and gserialized_spgist_leaf_consistent_2d().

370 {
371  if ( !a || !b )
372  return false;
373 
374  /* All things can contain EMPTY (except EMPTY) */
375  if ( box2df_is_empty(b) && ! box2df_is_empty(a) )
376  return true;
377 
378  if ( (a->xmin > b->xmin) || (a->xmax < b->xmax) ||
379  (a->ymin > b->ymin) || (a->ymax < b->ymax) )
380  {
381  return false;
382  }
383 
384  return true;
385 }
bool box2df_is_empty(const BOX2DF *a)
Here is the call graph for this function:
Here is the caller graph for this function: