[R-sig-Geo] Intersect Grid and Attributes

Lionel Hertzog s6lihert at uni-bonn.de
Fri Jul 19 15:43:21 CEST 2013


Dear Komine,

You could use the raster package to turn your grid into rasters (or 
stacks) and then use the xyFromCell and values function to get for each 
cell the coordinates plus the value.

Sincerely yours,

Lionel

On 19/07/2013 15:11, Komine wrote:
> Dear,
> I have 3 files (shape file): the first is a grid (with cells of 500m)
> covering my study area, the second file is soil moisture (Z1), the third
> file is vegetation moisture (Z2). When plotting data, Z1 and Z2 fall on the
> grid on certain cells while other cells are empty.  I would like to have for
> each cell, the coordinates X Y and the values of soil moisture and
> vegetation moisture corresponding for each cell. So I should have only one
> file with X Y Z1 Z2.
>
> Thank you in advance.
> Komine
>
>
>
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Intersect-Grid-and-Attributes-tp7584193.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



More information about the R-sig-Geo mailing list