[R-sig-Geo] alpha support in raster function 'KML'?

Gregovich, Dave P (DFG) dave.gregovich at alaska.gov
Wed Apr 8 03:06:50 CEST 2015


Hello,
Does the 'KML' function from the raster package support an alpha channel?
The .kml file output via the code below suggests it does not, but I was hoping for confirmation.
Thanks kindly.
Dave.

#__________________________________________________________
library(raster)
r <- raster(nrows=108, ncols=21, xmn=0, xmx=10)
r[]<-rep(1:10,1000)[1:ncell(r)]
t.colors <- colorRampPalette(colors = c('yellow','orange','red'),alpha=F)(10)
t.colors <- paste(t.colors,c('1A','33','4D','73','8C','99','B3','CC','E6','FF'),sep='')
KML(r, filename='c:/test/test.kml', blur = 3, col = t.colors, overwrite=T)
#__________________________________________________________

#salient sessionInfo()
#R version 3.1.3 (2015-03-09)
#Platform: x86_64-w64-mingw32/x64 (64-bit)
#Running under: Windows 7 x64 (build 7601) Service Pack 1
#other attached packages:
#[1] dismo_1.0-12    plotKML_0.5-0   twostageRSF_1.1 debug_1.3.1     rgdal_0.9-2     raster_2.3-33   sp_1.0-17


__________________________________
Dave Gregovich
Research Analyst
Alaska Department of Fish and Game
Wildlife Conservation Division
Douglas, AK 99821
(907) 465-4291
dave.gregovich at alaska.gov
__________________________________


	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list