PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ BOX2D_expand()

Datum BOX2D_expand ( PG_FUNCTION_ARGS  )

Definition at line 384 of file lwgeom_box.c.

385 {
386  GBOX *box = (GBOX *)PG_GETARG_POINTER(0);
387  GBOX *result = (GBOX *)palloc(sizeof(GBOX));
388  memcpy(result, box, sizeof(GBOX));
389 
390  if (PG_NARGS() == 2)
391  {
392  double d = PG_GETARG_FLOAT8(1);
393  gbox_expand(result, d);
394  }
395  else
396  {
397  double dx = PG_GETARG_FLOAT8(1);
398  double dy = PG_GETARG_FLOAT8(2);
399 
400  gbox_expand_xyzm(result, dx, dy, 0, 0);
401  }
402 
403  PG_RETURN_POINTER(result);
404 }
void gbox_expand(GBOX *g, double d)
Move the box minimums down and the maximums up by the distance provided.
Definition: gbox.c:97
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: gbox.c:115

References gbox_expand(), and gbox_expand_xyzm().

Here is the call graph for this function: