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

◆ square_grid_state()

static SquareGridState * square_grid_state ( double  size,
const GBOX gbox,
int32_t  srid 
)
static

Definition at line 189 of file lwgeom_generate_grid.c.

190{
191 SquareGridState *state = palloc0(sizeof(SquareGridState));
192
193 /* fill in state */
194 state->cell_shape = SHAPE_SQUARE;
195 state->size = size;
196 state->srid = srid;
197 state->done = false;
198 state->bounds = *gbox;
199
200 state->column_min = floor(gbox->xmin / size);
201 state->column_max = floor(gbox->xmax / size);
202 state->row_min = floor(gbox->ymin / size);
203 state->row_max = floor(gbox->ymax / size);
204 state->i = state->column_min;
205 state->j = state->row_min;
206 return state;
207}
@ SHAPE_SQUARE
double ymax
Definition liblwgeom.h:357
double xmax
Definition liblwgeom.h:355
double ymin
Definition liblwgeom.h:356
double xmin
Definition liblwgeom.h:354

References SquareGridState::bounds, SquareGridState::cell_shape, SquareGridState::column_max, SquareGridState::column_min, SquareGridState::done, SquareGridState::i, SquareGridState::j, SquareGridState::row_max, SquareGridState::row_min, SHAPE_SQUARE, SquareGridState::size, SquareGridState::srid, GBOX::xmax, GBOX::xmin, GBOX::ymax, and GBOX::ymin.

Referenced by ST_ShapeGrid().

Here is the caller graph for this function: