Last active
July 22, 2016 06:25
-
-
Save mdsumner/8404668a41b47b1dacb5d8b8f326acc1 to your computer and use it in GitHub Desktop.
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
library(raster) | |
## a tiled tiff (256x256) | |
## Size is 21600, 10800 | |
r <- raster("Etopo1.tif") | |
library(geosphere) | |
set.seed(1) | |
pts <- randomCoordinates(1000) | |
system.time(extract(r, pts)) | |
# user system elapsed | |
# 5.78 0.08 5.86 | |
## a not-tiled GeoTIFF | |
r2 <- writeRaster(r, "file.tif") | |
system.time(extract(r2, pts)) | |
# user system elapsed | |
# 1.72 0.06 1.78 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment