PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ BOX2D_expand()

Datum BOX2D_expand ( PG_FUNCTION_ARGS  )

Definition at line 386 of file lwgeom_box.c.

387 {
388  GBOX *box = (GBOX *)PG_GETARG_POINTER(0);
389  GBOX *result = (GBOX *)palloc(sizeof(GBOX));
390  memcpy(result, box, sizeof(GBOX));
391 
392  if (PG_NARGS() == 2)
393  {
394  double d = PG_GETARG_FLOAT8(1);
395  gbox_expand(result, d);
396  }
397  else
398  {
399  double dx = PG_GETARG_FLOAT8(1);
400  double dy = PG_GETARG_FLOAT8(2);
401 
402  gbox_expand_xyzm(result, dx, dy, 0, 0);
403  }
404 
405  PG_RETURN_POINTER(result);
406 }
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
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

References gbox_expand(), and gbox_expand_xyzm().

Here is the call graph for this function: