Get the spatial resolution of a spatial object.
getRes(x, ...) # S4 method for ANY getRes(x) # S4 method for geom getRes(x) # S4 method for Raster getRes(x) # S4 method for SpatRaster getRes(x) # S4 method for matrix getRes(x)
x | the object from which to derive the resolution. |
---|---|
... | other arguments. |
A vector of two values of the spatial resolution of x
in x and
y dimension.
Other getters:
getCRS()
,
getCols()
,
getExtent()
,
getFeatures()
,
getGroups()
,
getHistory()
,
getLayers()
,
getNames()
,
getPoints()
,
getRows()
,
getType()
,
getWindow()
getRes(gtGeoms$grid$categorical) #> [1] 1 1 gc_raster(gtGeoms$grid$categorical) %>% getRes() #> [1] 1 1 gc_terra(gtGeoms$grid$categorical) %>% getRes() #> [1] 1 1 getRes(x = matrix(0, 3, 5)) #> [1] 1 1