[R-sig-Geo] Open raster _ extract pixel value
Komine
momadou at yahoo.fr
Tue Mar 15 00:02:00 CET 2011
Thanks to all for your answers, I progress!
Robert, after to try your code, all is ok. Now I try to open a NDVI image
with HRD extension. Also almost all is ok with the next code:
library(raster)
myobject <-raster("C:\\Users\\komine\\Desktop\\MODIS2\\NDVI_280")
plot(myobject)
click(myobject) # and click somewhere on the map to get the value at that
location
myobject[1] # value of first cell
myobject[10,10] # value of cell at row 10, column 10
extract(myobject, cbind(496439.36,1662612.38)) # value at coordinates
- However, the image NDVI don’t appear well because I have a color on the
raster map like a mask,
- Also, I compare to verify a pixel value NDVI extract from R and the ENVI
software (like Erdas) but I have two differences values for the same pixel
(for the past coordinates, pixel value from R= -0.5376111 whereas for ENVI=
-0.586962)
Could you help on this problem?
Thanks again
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Open-raster-extract-pixel-value-tp6166730p6171051.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list