I'm currently comparing a MODIS time series of about 15 years to determine the effects of pasture management practices on the "greeness" of pastures in a water catchment.
So far I've been able to extract and plot the EVI data for a certain point on the raster stack:
> setwd("~/UNI/honors/EVI") > pts library(raster) > img evi pts@data str(pts@data)This gives an output:
'data.frame': 1 obs. of 324 variables: $ Id : int 0 $ X20000218.250m_16_days_EVI: num 1815 $ X20000305.250m_16_days_EVI: num 1894 $ X20000321.250m_16_days_EVI: num 5987 $ X20000422.250m_16_days_EVI: num 6290 $ X20000508.250m_16_days_EVI: num 6025 $ X20000524.250m_16_days_EVI: num 5743 $ X20000609.250m_16_days_EVI: num 4867 $ X20000625.250m_16_days_EVI: num 4020 $ X20000711.250m_16_days_EVI: num 4542etc...
I was wondering if there was a way to randomly extract data from the raster stack within the extent of a shapefile "managed_pasture" and if possible, can it be pair sampled with random points within the shapefile "nonmanaged_pasture"?
أكثر...
So far I've been able to extract and plot the EVI data for a certain point on the raster stack:
> setwd("~/UNI/honors/EVI") > pts library(raster) > img evi pts@data str(pts@data)This gives an output:
'data.frame': 1 obs. of 324 variables: $ Id : int 0 $ X20000218.250m_16_days_EVI: num 1815 $ X20000305.250m_16_days_EVI: num 1894 $ X20000321.250m_16_days_EVI: num 5987 $ X20000422.250m_16_days_EVI: num 6290 $ X20000508.250m_16_days_EVI: num 6025 $ X20000524.250m_16_days_EVI: num 5743 $ X20000609.250m_16_days_EVI: num 4867 $ X20000625.250m_16_days_EVI: num 4020 $ X20000711.250m_16_days_EVI: num 4542etc...
I was wondering if there was a way to randomly extract data from the raster stack within the extent of a shapefile "managed_pasture" and if possible, can it be pair sampled with random points within the shapefile "nonmanaged_pasture"?
أكثر...