compareGeom | R Documentation |
Evaluate whether two SpatRasters have the same extent, number of rows and columns, projection, resolution, and origin (or a subset of these comparisons).
Or evaluate whether two SpatVectors have the same geometries, or whether a SpatVector has duplicated geometries.
## S4 method for signature 'SpatRaster,SpatRaster'
compareGeom(x, y, ..., lyrs=FALSE, crs=TRUE, warncrs=FALSE, ext=TRUE,
rowcol=TRUE, res=FALSE, stopOnError=TRUE, messages=FALSE)
## S4 method for signature 'SpatVector,SpatVector'
compareGeom(x, y, tolerance=0)
## S4 method for signature 'SpatVector,missing'
compareGeom(x, y, tolerance=0)
x |
SpatRaster or SpatVector |
y |
Same as |
... |
Additional SpatRasters |
lyrs |
logical. If |
crs |
logical. If |
warncrs |
logical. If |
ext |
logical. If |
rowcol |
logical. If |
res |
logical. If |
stopOnError |
logical. If |
messages |
logical. If |
tolerance |
numeric |
logical (SpatRaster) or matrix of logical (SpatVector)
r1 <- rast()
r2 <- rast()
r3 <- rast()
compareGeom(r1, r2, r3)
nrow(r3) <- 10
## Not run:
compareGeom(r1, r3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.