PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ box2df_union_edge()

static float box2df_union_edge ( const BOX2DF *  a,
const BOX2DF *  b 
)
static

Definition at line 280 of file gserialized_gist_2d.c.

281 {
282  float result;
283 
284  POSTGIS_DEBUG(5,"entered function");
285 
286  if ( a == NULL && b == NULL )
287  {
288  elog(ERROR, "box2df_union_edge received two null arguments");
289  return 0.0;
290  }
291 
292  if ( a == NULL || box2df_is_empty(a) )
293  return box2df_edge(b);
294 
295  if ( b == NULL || box2df_is_empty(b) )
296  return box2df_edge(a);
297 
298  result = (Max(a->xmax,b->xmax) - Min(a->xmin,b->xmin)) +
299  (Max(a->ymax,b->ymax) - Min(a->ymin,b->ymin));
300 
301  POSTGIS_DEBUGF(5, "union edge of %s and %s is %.8g", box2df_to_string(a), box2df_to_string(b), result);
302 
303  return result;
304 }
static char * box2df_to_string(const BOX2DF *a)
bool box2df_is_empty(const BOX2DF *a)
static float box2df_edge(const BOX2DF *a)

References box2df_edge(), box2df_is_empty(), and box2df_to_string().

Referenced by gserialized_gist_penalty_2d().

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