PostGIS  2.5.2dev-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 104 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 _lwt_AddLine(), BOX2D_expand(), LWGEOM_expand(), lwt_AddPolygon(), and mvt_geom().

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