PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ gbox_expand()

void gbox_expand ( GBOX g,
double  d 
)

Move the box minimums down and the maximums up by the distance provided.

Definition at line 108 of file g_box.c.

References GBOX::flags, FLAGS_GET_M, FLAGS_GET_Z, GBOX::mmax, GBOX::mmin, GBOX::xmax, GBOX::xmin, GBOX::ymax, GBOX::ymin, GBOX::zmax, and GBOX::zmin.

Referenced by BOX2D_expand(), LWGEOM_expand(), lwt_AddLine(), and lwt_AddPolygon().

109 {
110  g->xmin -= d;
111  g->xmax += d;
112  g->ymin -= d;
113  g->ymax += d;
114  if ( FLAGS_GET_Z(g->flags) )
115  {
116  g->zmin -= d;
117  g->zmax += d;
118  }
119  if ( FLAGS_GET_M(g->flags) )
120  {
121  g->mmin -= d;
122  g->mmax += d;
123  }
124 }
double xmax
Definition: liblwgeom.h:293
double zmax
Definition: liblwgeom.h:297
double ymin
Definition: liblwgeom.h:294
double xmin
Definition: liblwgeom.h:292
double ymax
Definition: liblwgeom.h:295
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:140
uint8_t flags
Definition: liblwgeom.h:291
double mmin
Definition: liblwgeom.h:298
double zmin
Definition: liblwgeom.h:296
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:141
double mmax
Definition: liblwgeom.h:299
Here is the caller graph for this function: