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

Definition at line 198 of file gserialized_gist_2d.c.

References box2df_size(), and result.

Referenced by gserialized_gist_penalty_2d().

199 {
200  float result;
201 
202  POSTGIS_DEBUG(5,"entered function");
203 
204  if ( a == NULL && b == NULL )
205  {
206  elog(ERROR, "box2df_union_size received two null arguments");
207  return 0.0;
208  }
209 
210  if ( a == NULL )
211  return box2df_size(b);
212 
213  if ( b == NULL )
214  return box2df_size(a);
215 
216  result = ((double)Max(a->xmax,b->xmax) - (double)Min(a->xmin,b->xmin)) *
217  ((double)Max(a->ymax,b->ymax) - (double)Min(a->ymin,b->ymin));
218 
219  POSTGIS_DEBUGF(5, "union size of %s and %s is %.8g", box2df_to_string(a), box2df_to_string(b), result);
220 
221  return result;
222 }
char ** result
Definition: liblwgeom.h:218
static float box2df_size(const BOX2DF *a)

Here is the call graph for this function:

Here is the caller graph for this function: