[R-sig-Geo] Selecting a raster cell which contains a point of given coordinates

Tom Gottfried tom.gottfried at wzw.tum.de
Fri Feb 18 10:51:31 CET 2011


Suppose you want to know the attribute values of the grid cell:
?over
?overlay

regards,
Tom

Am 18.02.2011 08:56, schrieb luca candeloro:
> Hi all,
> I have a raster file read by:
> Map=readGDAL(paste("C:/Temperature/HDF/TERRA/TIF/Terra.",datesMOD11A1[d],".LST_Day_1km.tif",sep=""))
> 
> and a point coordinates like:
> 
> Gattia=matrix(c(x=13.66966,y=42.63941), ncol=2)
> Gattia=project(Gattia,proj4string(Map))
> 
> I would like to know which is the cell in the Map that contains the
> coordinates of the point named Gattia.
> 
> Any help?
> 
> Thanks,
> Luca.
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Technische Universität München
Department für Pflanzenwissenschaften
Lehrstuhl für Grünlandlehre
Alte Akademie 12
85350 Freising / Germany
Phone: ++49 (0)8161 715324
Fax:   ++49 (0)8161 713243
email: tom.gottfried at wzw.tum.de
http://www.wzw.tum.de/gruenland



More information about the R-sig-Geo mailing list