Skip to content
Prev 9597 / 29559 Next

Problems with mask (raster)

Hola Manuel,

Regarding the values of the .bil files I was dealing with 
that also sometime ago.

I found this link in a forum who helped me understand what 
is going on with these files:

http://pvanb.wordpress.com/2010/02/06/importing-worldclim-climate-bil-datalayers-in-grass-gis/

So I wrote in R something like this to get the right 
values:

library(raster)
bio <- raster("bio1_23.bil")
ind <- which(bio[] > 32767)
bio[ind] <- bio[ind] - (65535+1)
bio[bio[] == -9999] <- NA
bio
plot(bio)

Hope this helps.

Saludos, pura vida

Jaime

On Thu, 14 Oct 2010 16:17:25 -0600
Manuel Sp?nola <mspinola10 at gmail.com> wrote: