PostGIS  2.3.7dev-r@@SVN_REVISION@@
static float box2df_union_size ( const BOX2DF *  a,
const BOX2DF *  b 
)
static

Definition at line 219 of file gserialized_gist_2d.c.

References box2df_size(), and box2df_to_string().

Referenced by gserialized_gist_penalty_2d().

220 {
221  float result;
222 
223  POSTGIS_DEBUG(5,"entered function");
224 
225  if ( a == NULL && b == NULL )
226  {
227  elog(ERROR, "box2df_union_size received two null arguments");
228  return 0.0;
229  }
230 
231  if ( a == NULL )
232  return box2df_size(b);
233 
234  if ( b == NULL )
235  return box2df_size(a);
236 
237  result = ((double)Max(a->xmax,b->xmax) - (double)Min(a->xmin,b->xmin)) *
238  ((double)Max(a->ymax,b->ymax) - (double)Min(a->ymin,b->ymin));
239 
240  POSTGIS_DEBUGF(5, "union size of %s and %s is %.8g", box2df_to_string(a), box2df_to_string(b), result);
241 
242  return result;
243 }
static float box2df_size(const BOX2DF *a)
static char * box2df_to_string(const BOX2DF *a)

Here is the call graph for this function:

Here is the caller graph for this function: