Extracting values from raster according to Lat and long of values?
Curlew's answer can be improved upon like this (do not use a loop, and use a RasterStack)
library(raster)
files <- list.files("D:\\ECV\\2010", "*.envi", full.names = TRUE)
s <- stack(files)
point <- cbind(44.8386, 0.5783)
result <- extract(s, point)
Assuming that you know how to create a point shape out of your longitude, latitude value:
library(raster);library(rgdal)
point_location <- readOGR("Foldername","filename")
a<-list.files("D:\\ECV\\2010", "*.envi", full.names = TRUE)
result <- data.frame(ID=seq(1,length(a)),Value=rep(NA,length(a))
for(i in 1:length(a)){
d <- raster(a[i])
result$Value[i] <- extract(d,point_location)
}
EDIT: The quick and dirty way to do it manually in QGIS
- Load in your NVDI raster layers and Create a new point layer with WGS84 (http://imgur.com/HR1oEaG)
- Set the new point layer on EDIT-Mode and go to the address field on the bottom of your QGis window
- Here add your longitude,latitude values (http://imgur.com/UpeunXm),press return and zoom to your address. This is very dirty and not exact. If you want exact values you should search how to convert those values to a shapefile in QGIS (i would try to use the add text-delimited file and create a .csv file with your locations first.)
- Now add a point to your new layer on this location and save.
- Open the Plugin Downloader and download the Point Sampling Tool. The Rest is self-explaining.