PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ BOX3D_expand()

Datum BOX3D_expand ( PG_FUNCTION_ARGS  )

Definition at line 359 of file lwgeom_box3d.c.

360{
361 BOX3D *box = (BOX3D *)PG_GETARG_POINTER(0);
362 BOX3D *result = (BOX3D *)palloc(sizeof(BOX3D));
363 memcpy(result, box, sizeof(BOX3D));
364
365 if (PG_NARGS() == 2)
366 {
367 /* Expand the box the same amount in all directions */
368 double d = PG_GETARG_FLOAT8(1);
369 expand_box3d(result, d);
370 }
371 else
372 {
373 double dx = PG_GETARG_FLOAT8(1);
374 double dy = PG_GETARG_FLOAT8(2);
375 double dz = PG_GETARG_FLOAT8(3);
376
377 expand_box3d_xyz(result, dx, dy, dz);
378 }
379
380 PG_RETURN_POINTER(result);
381}
static void expand_box3d_xyz(BOX3D *box, double dx, double dy, double dz)
void expand_box3d(BOX3D *box, double d)
Expand given box of 'd' units in all directions.

References expand_box3d(), and expand_box3d_xyz().

Here is the call graph for this function: