R - original colours of georeferenced raster image using ggplot2- and raster-packages
问题 I would like to use the original colortable of a >>georeferenced raster image<< (tif-file) as coloured scale in a map plotted by ggplot/ggplot2 . Due to not finding an easier solution, I accessed the colortable -slot from the legend -attribute of the loaded raster image (object) raster1 like so: raster1 <- raster(paste(workingDir, "/HUEK200_Durchlaessigkeit001_proj001.tif", sep="", collapse="")) raster1.pts <- rasterToPoints(raster1) raster1.df <- data.frame(raster1.pts) colTab <- attr