Hi Ben, I would not think this has to do with memory limitations. The error message suggest that you have a bad file, and, hence, that the problem is with the software that created the file, or with an interrupted download. Robert
On Sat, Jul 4, 2015 at 6:24 PM, Ben Weinstein <[email protected]> wrote: > Hi all, > > I'm getting a generic, " Error: Failure during raster IO" when trying to > crop or plot a .tif file using the raster package. > > I made a markdown document showing the issue. > > https://htmlpreview.github.io/?https://github.com/bw4sz/Drone/blob/master/error.html > > To summarize: > > I received a orthomosiac image from a collaborator that i'm reading into R. > The file was captured using a unmanned aerial vehicle and stitched in > Agisoft Photoscan, and the resulting .tif was sent to me. > > The file is quite large (~4gb on disk) and at very high resolution. > > When i read in using raster, everything seems fine. The extent matches the > correct location on the earth's surface. > > I’ve tried over multiple computers, reading as brick/stack/raster, > reinstalling rgdal/raster, reinstalling R and playing around with the file > names. > > Given the huge file size, i assume that this is has to do with memory (as > been suggested elsewhere with this error) - although checking out the task > manager, i see no memory spike (i have ~60gb memory) and it appears to be a > formatting error for gdal. I’ve tried reading direct with gdal, and that > fails, even when reading just a portion. > > I worry that the because resolution has been labeled in reference to > latlong (Seconds?) and is very small, and is approaching some rounding > error. > > The metadata reads in correctly. > > >> r > > class : RasterLayer > > band : 1 (of 4 bands) > > dimensions : 39891, 35132, 1401450612 (nrow, ncol, ncell) > > resolution : 1.83715e-07, 1.3612e-07 (x, y) > > extent : -122.9106, -122.9042, 42.41708, 42.42251 (xmin, xmax, ymin, > ymax) > > coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 > +towgs84=0,0,0 > > data source : C:\Users\Ben\Dropbox\Droning\AgisoftFull20150425_Run3.tif > > names : AgisoftFull20150425_Run3 > > values : 0, 255 (min, max) > > > I appreciate any thoughts on the next thing to try. > > Best, > > Ben > > > Ecology and Evolution > > Stony Brook University > > http://benweinstein.weebly.com/ > > [[alternative HTML version deleted]] > > _______________________________________________ > R-sig-Geo mailing list > [email protected] > https://stat.ethz.ch/mailman/listinfo/r-sig-geo _______________________________________________ R-sig-Geo mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-geo
