Skip to content

Commit

Permalink
fixes #1654
Browse files Browse the repository at this point in the history
  • Loading branch information
rhijmans committed Nov 28, 2024
1 parent f2fcea9 commit 43681fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions R/values.R
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@ setMethod("compareGeom", signature(x="SpatVector", y="SpatVector"),
}
)

setMethod("compareGeom", signature(x="SpatVector", y="SpatVector"),
setMethod("compareGeom", signature(x="SpatVector", y="missing"),
function(x, y, tolerance=0) {
out <- x@ptr$equals_within(tolerance)
symmetrical=FALSE # this is inefficient
out <- x@ptr$equals_within(symmetrical, tolerance)
x <- messages(x, "compareGeom")
out[out == 2] <- NA
out <- matrix(as.logical(out), nrow=nrow(x), byrow=TRUE)
Expand Down
2 changes: 1 addition & 1 deletion man/compareGeom.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
\alias{compareGeom,SpatVector,SpatVector-method}
\alias{compareGeom,SpatVector,missing-method}

\title{Compare geometries of SpatRasters}
\title{Compare geometries}

\description{
Evaluate whether two SpatRasters have the same extent, number of rows and columns, projection, resolution, and origin (or a subset of these comparisons).
Expand Down

0 comments on commit 43681fd

Please sign in to comment.