PostGIS  2.5.0dev-r@@SVN_REVISION@@
Datum BOX2D_expand ( PG_FUNCTION_ARGS  )

Definition at line 378 of file lwgeom_box.c.

References gbox_expand(), and gbox_expand_xyzm().

379 {
380  GBOX *box = (GBOX *)PG_GETARG_POINTER(0);
381  GBOX *result = (GBOX *)palloc(sizeof(GBOX));
382  memcpy(result, box, sizeof(GBOX));
383 
384  if (PG_NARGS() == 2)
385  {
386  double d = PG_GETARG_FLOAT8(1);
387  gbox_expand(result, d);
388  }
389  else
390  {
391  double dx = PG_GETARG_FLOAT8(1);
392  double dy = PG_GETARG_FLOAT8(2);
393 
394  gbox_expand_xyzm(result, dx, dy, 0, 0);
395  }
396 
397  PG_RETURN_POINTER(result);
398 }
void gbox_expand_xyzm(GBOX *g, double dx, double dy, double dz, double dm)
Move the box minimums down and the maximums up by the distances provided.
Definition: g_box.c:122
void gbox_expand(GBOX *g, double d)
Move the box minimums down and the maximums up by the distance provided.
Definition: g_box.c:104

Here is the call graph for this function: