Dear Nevil Amos,

Maybe the function 'reclassify' in the raster package is what you are looking for.

Yours,
Lionel

On 13/09/2013 08:36, nevil amos wrote:
I have a large raster (4gb as a .asc file) with 197000 values, that I need
to reclassify by values in  an large lookup table, 197,000rowsx80reclass
value columns.

I have tried using sub in a loop to replace the values, however the process
is taking hours, without even completing the first of the
  reclassifications.

I would be grateful for any suggestions of processes that I can use to
speed the reclass process ( I need files that can be read back into ARCGIS
at the end of the process.

My current script is

library(raster)
r<-raster("Raster.asc")

COLS<-names(mydataOut[,5:88])

for (i in COLS){

   subs(r,mydataOut,by="Value",which=i,filename=paste(i,".asc",sep=""))
   print(paste ("done", i))
}


Many thanks

Nevil Amos

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to