Hello Dear R-User

My first forum participation in the R-list email

El 13/03/2011, a las 11:33, Komine escribió:

> Hi, 
> I begin to work with R software to treat raster data. 
> Now, I have a NDVI image with a tiff extension. I want to open this image
> and to extract NDVI value for some pixel which I have their coordinates. 
> 1-	Please what is the code to open a tiff image with R ?

## e.g. How to import geotiff in R-Statistic
## all this works pretty fast as raster takes care of the memory
library(raster)
myobject <- raster("myfile.tif")
e <- extent(-90, -32, -60, 15)
r <- crop(myfile, e)
plot(r)

## if we want to enforce the full memory use as an sp object
x <- as(r, "SpatialGridDataFrame")
Sources https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20100722/8ae7e4bf/attachment.pl

> 2-	How to extract the value of some pixel which I have their coordinate ? 
> NB: I hope you understand my questions with my bad English. 
> Thank you 
> 
> 
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Open-raster-extract-pixel-value-tp6166730p6166730.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

	[[alternative HTML version deleted]]

