PostGIS  2.3.7dev-r@@SVN_REVISION@@
Datum BOX3D_expand ( PG_FUNCTION_ARGS  )

Definition at line 384 of file lwgeom_box3d.c.

References expand_box3d(), and expand_box3d_xyz().

385 {
386  BOX3D *box = (BOX3D *)PG_GETARG_POINTER(0);
387  BOX3D *result = (BOX3D *)palloc(sizeof(BOX3D));
388  memcpy(result, box, sizeof(BOX3D));
389 
390  if (PG_NARGS() == 2) {
391  /* Expand the box the same amount in all directions */
392  double d = PG_GETARG_FLOAT8(1);
393  expand_box3d(result, d);
394  }
395  else
396  {
397  double dx = PG_GETARG_FLOAT8(1);
398  double dy = PG_GETARG_FLOAT8(2);
399  double dz = PG_GETARG_FLOAT8(3);
400 
401  expand_box3d_xyz(result, dx, dy, dz);
402  }
403 
404  PG_RETURN_POINTER(result);
405 }
static void expand_box3d_xyz(BOX3D *box, double dx, double dy, double dz)
Definition: lwgeom_box3d.c:373
void expand_box3d(BOX3D *box, double d)
Expand given box of 'd' units in all directions.
Definition: lwgeom_box3d.c:361

Here is the call graph for this function: