Skip to contents

Create an ezgrid object to define a desired extent, projection and crs. Use this as the y argument in ezwarp().

Usage

ezgrid(extent, dimension = NULL, projection, source = NULL)

Arguments

extent

numeric vector with the following form: c(xmin, xmax, ymin, ymax)

dimension

numeric vector, length 2. define the XY dimension of the grid: c(x.dim, y.dim)

projection

projection of warped raster (in Well-Known-Text, or any projection string accepted by GDAL)

source

default NULL an optional spatial source/file path. used internally.

Value

an ezgrid object

Examples

ezgrid(
  extent = c(-180, 180, -90, 90),
  dimension = c(180, 90),
  projection = "EPSG:4326"
)
#> $extent
#> [1] -180  180  -90   90
#> 
#> $dimension
#> [1] 180  90
#> 
#> $projection
#> [1] "EPSG:4326"
#> 
#> $source
#> NULL
#> 
#> attr(,"class")
#> [1] "ezgrid"