Skip to content
Back to formatted view

Raw Message

Message-ID: <1344431847.45872.YahooMailNeo@web121901.mail.ne1.yahoo.com>
Date: 2012-08-08T13:17:27Z
From: Thiago V. dos Santos
Subject: Create raster based on overlapping

?Dear all,
??
?I have two rasters: r1 is a 0.5 degree netcdf file produced by a vegetation model. r2 is a 30m shapefile which I rasterized to a raster with the same 30m resolution. r2 values are all NA and 1.

?Please see below:

> r1
class ? ? ? : RasterLayer?
dimensions ?: 10, 18, 180 ?(nrow, ncol, ncell)
resolution ?: 0.5, 0.5 ?(x, y)
extent ? ? ?: -53, -44, -25, -20 ?(xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0?
values ? ? ?: in memory
layer name ?: variable?
zvar ? ? ? ?: variable?

> r2
class ? ? ? : RasterLayer?
dimensions ?: 14469, 22190, 321067110 ?(nrow, ncol, ncell)
resolution ?: 0.0002702699, 0.0002702702 ?(x, y)
extent ? ? ?: -52.60649, -46.6092, -23.7172, -19.80666 ?(xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0?
values ? ? ?: in memory
layer name ?: cs_2005spx1?
min value ? : 1?
max value ? : 1?

?Here you can see a join plot: http://img855.imageshack.us/img855/2820/plotzoom.png

?Is it possible to create a new raster, which is composed only by r1 cells which are "touched" by r2 cells?