[Raster-commits] r170 - pkg/raster/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jan 22 06:44:07 CET 2009


Author: rhijmans
Date: 2009-01-22 06:44:07 +0100 (Thu, 22 Jan 2009)
New Revision: 170

Modified:
   pkg/raster/R/compare.R
Log:


Modified: pkg/raster/R/compare.R
===================================================================
--- pkg/raster/R/compare.R	2009-01-22 05:36:16 UTC (rev 169)
+++ pkg/raster/R/compare.R	2009-01-22 05:44:07 UTC (rev 170)
@@ -54,8 +54,9 @@
 		if (orig) {
 			dif1 <- origin(objects[[1]]) - origin(objects[[i]])
 			dif2 <- abs(origin(objects[[1]])) - origin(objects[[i]])
-			dif3 <- pmin(dif1, dif2)
-			if (!(isTRUE(all.equal(dif3, c(0,0), tolerance=tolerance, scale=minres)))) {
+			dif3 <- abs(origin(objects[[i]])) - origin(objects[[1]])
+			dif4 <- pmin(dif1, dif2, dif3)
+			if (!(isTRUE(all.equal(dif4, c(0,0), tolerance=tolerance, scale=minres)))) {
 				result <- F
 				if (stopiffalse) { stop('different origin') }
 				if (showwarning) { warning('different origin') }



More information about the Raster-commits mailing list