Created
April 13, 2012 06:27
-
-
Save scw/2374373 to your computer and use it in GitHub Desktop.
Check raster dimensions match expectation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checkRaster <- function(raster) { | |
if (raster@nrows * raster@ncols == 220106) { | |
message <- paste("Raster size checks out for layer:", raster@layernames, sep="") | |
} | |
else { | |
message <- paste( "invalid raster dimensions; nrows:", raster@nrows, " ncols:", raster@ncols, sep="") | |
} | |
print(message) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment