PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ condition_gridspec_scale()

static void condition_gridspec_scale ( gridspec grid)
inlinestatic

Definition at line 2269 of file lwgeom.c.

2270 {
2271  if(grid->xsize > 0)
2272  {
2273  if(grid->xsize < 1)
2274  grid->xscale = snap_to_int(1/grid->xsize);
2275  else
2276  grid->xsize = snap_to_int(grid->xsize);
2277  }
2278  if(grid->ysize > 0)
2279  {
2280  if(grid->ysize < 1)
2281  grid->yscale = snap_to_int(1/grid->ysize);
2282  else
2283  grid->ysize = snap_to_int(grid->ysize);
2284  }
2285 }
static double snap_to_int(double val)
Definition: lwgeom.c:2252
double xscale
Definition: liblwgeom.h:1407
double ysize
Definition: liblwgeom.h:1404
double xsize
Definition: liblwgeom.h:1403
double yscale
Definition: liblwgeom.h:1408

References snap_to_int(), gridspec_t::xscale, gridspec_t::xsize, gridspec_t::yscale, and gridspec_t::ysize.

Referenced by lwgeom_grid_in_place().

Here is the call graph for this function:
Here is the caller graph for this function: