[R] how to extract values from a raster according to Lat and long of the values?
Jonsson
amen.alyaari at Bordeaux.inra.fr
Sun Jan 27 14:53:10 CET 2013
having 12 files with 12 hdrs for one year: these files are raster
(projected WGS84,lat
long):https://echange-fichiers.inra.fr/get?k=rLSyoavrnifGyH5XrlO
samples = 1440
lines = 720
bands = 1
header offset = 0
file type = ENVI Standard
data type = 4
interleave = bsq
byte order = 0
map info = { Geographic Lat/Lon, 1, 1, -180, 90, 0.25,
0.25,WGS-84}
coordinate system string =
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",
SPHEROID["WGS_1984",6378137,298.257223563]]
,PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
}
These lines will open the files as a list:
a<-list.files("D:\\ECV\\2010", "*.envi", full.names = TRUE)
for(i in 1:length(a)){
d <- raster(a[i]}
I would like to extract the values correspond to 44.8386° N, 0.5783° W from
all files as txt file
--
View this message in context: http://r.789695.n4.nabble.com/how-to-extract-values-from-a-raster-according-to-Lat-and-long-of-the-values-tp4656767.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list