PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ BOX2D_expand()

Datum BOX2D_expand ( PG_FUNCTION_ARGS  )

Definition at line 387 of file lwgeom_box.c.

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

Here is the call graph for this function: