PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ box2df_union_edge()

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

Definition at line 255 of file gserialized_gist_2d.c.

References box2df_edge(), and box2df_to_string().

Referenced by gserialized_gist_penalty_2d().

256 {
257  float result;
258 
259  POSTGIS_DEBUG(5,"entered function");
260 
261  if ( a == NULL && b == NULL )
262  {
263  elog(ERROR, "box2df_union_edge received two null arguments");
264  return 0.0;
265  }
266 
267  if ( a == NULL )
268  return box2df_edge(b);
269 
270  if ( b == NULL )
271  return box2df_edge(a);
272 
273  result = (Max(a->xmax,b->xmax) - Min(a->xmin,b->xmin)) +
274  (Max(a->ymax,b->ymax) - Min(a->ymin,b->ymin));
275 
276  POSTGIS_DEBUGF(5, "union edge of %s and %s is %.8g", box2df_to_string(a), box2df_to_string(b), result);
277 
278  return result;
279 }
static char * box2df_to_string(const BOX2DF *a)
static float box2df_edge(const BOX2DF *a)
Here is the call graph for this function:
Here is the caller graph for this function: