Skip to contents

To simplify and accelerate the computation of flood duration with flood3 in massive areas this function provides a simple tiling algorithm.

Usage

createTiles(x, size_x, size_y, subset = TRUE)

Arguments

x

has to by type sf.

size_x

tile size along the x-axis in the units of the current projection (numeric).

size_y

tile size along the y-axis in the units of the current projection (numeric).

subset

boolean determining whether all or only intersecting tiles are returned.

Value

sf object containing tiles covering x.

Examples

  options("hydflood.datadir" = tempdir())
  library(hydflood)
  tiles <- createTiles(x = sf.af(name = "Elbe"),
                       size_x = 10000, size_y = 10000)
  plot(tiles["tile_ID"])