make_grid.Rd
construct SpatialGridDataFrame
A numeric vector, [lon_min, lon_max, lat_min, lat_max]
Numeric vector, grid cell size [cellsize_lon, cellsize_lat]
.
A vector, [midgrid_lon, midgrid_lat]
. If midgrid = false, then
begin point and end point locate on grid lines; If true, then begin point and
end point in the middle of grid.
sp::CRS-class()
Projection.
Character, one of mat
or vec
.
base
: If image(x)
looks correct, x can be put into grid directly:
grid@data <- data.frame(x = as.numeric(x))
gdal
: If image(x)
looks correct, x needs to flipud
:
grid@data <- data.frame(x = as.numeric(Ipaper::flipud(x)))
In version >= 0.1.3, c("mat", "vec")
was renamed as c("base", "gdal")
.
boolean
The input matrix suits for image
, can be directly input to make_grid
.
range <- c(73, 105, 25, 40) # Tibetan Plateau
grid <- make_grid(range, cellsize = 1 / 2, midgrid = TRUE)