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

◆ condition_gridspec_scale()

static void condition_gridspec_scale ( gridspec grid)
inlinestatic

Definition at line 2297 of file lwgeom.c.

2298{
2299 if(grid->xsize > 0)
2300 {
2301 if(grid->xsize < 1)
2302 grid->xscale = snap_to_int(1/grid->xsize);
2303 else
2304 grid->xsize = snap_to_int(grid->xsize);
2305 }
2306 if(grid->ysize > 0)
2307 {
2308 if(grid->ysize < 1)
2309 grid->yscale = snap_to_int(1/grid->ysize);
2310 else
2311 grid->ysize = snap_to_int(grid->ysize);
2312 }
2313}
static double snap_to_int(double val)
Definition lwgeom.c:2280
double xscale
Definition liblwgeom.h:1409
double ysize
Definition liblwgeom.h:1406
double xsize
Definition liblwgeom.h:1405
double yscale
Definition liblwgeom.h:1410

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: