PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ BOX2D_expand()

Datum BOX2D_expand ( PG_FUNCTION_ARGS  )

Definition at line 386 of file lwgeom_box.c.

References BOX2D_to_BOX3D(), gbox_expand(), gbox_expand_xyzm(), and PG_FUNCTION_INFO_V1().

Referenced by BOX2D_union().

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_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:126
void gbox_expand(GBOX *g, double d)
Move the box minimums down and the maximums up by the distance provided.
Definition: g_box.c:108
Here is the call graph for this function:
Here is the caller graph for this function: