PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ square_state_next()

static void square_state_next ( SquareGridState state)
static

Definition at line 210 of file lwgeom_generate_grid.c.

211 {
212  if (!state || state->done) return;
213  /* Move up one row */
214  state->j++;
215  /* Off the end, increment column counter, reset row counter back to (appropriate) minimum */
216  if (state->j > state->row_max)
217  {
218  state->i++;
219  state->j = state->row_min;
220  }
221  /* Column counter over max means we have used up all combinations */
222  if (state->i > state->column_max)
223  {
224  state->done = true;
225  }
226 }

References SquareGridState::column_max, SquareGridState::done, SquareGridState::i, SquareGridState::j, SquareGridState::row_max, and SquareGridState::row_min.

Referenced by ST_ShapeGrid().

Here is the caller graph for this function: