: raster0 <- raster(paste(workingDir, "/HUEK000_Durchlaessigkeit000_proj000.tif", sep="", collapse="")) raster0.pts <- rasterToPoints(raster0) raster0.df <- data.frame(raster0.pts) colTab <- attr(raster0, "legend")@colortable  