search for: infile_info

Displaying 1 result from an estimated 1 matches for "infile_info".

Did you mean: file_info
2008 Nov 05
1
Using RGDAL to "copy" header information...
...y image file GDAL supports -- the code below just "copies" the image one line at a time: ### library(rgdal) infile='elev' outfile_base='testout' outfile_ext='.bil' outfile=paste(outfile_base,outfile_ext,sep='') outcon <- file(outfile, "wb") infile_info=GDALinfo(infile) nl=infile_info[[1]] ns=infile_info[[2]] for (row in 1:nl) { templine <- readGDAL(infile,region.dim=c(1,ns),offset=c(row-1,0)) writeBin(templine[[1]], outcon,size=4) } close(outcon) # Below doesn't work # writeGDAL(templine,outfile_base,drivername='EHdr',type...