0
我有8個環境變量的raster.stack和生態區域爲美國南部提取值
files<-list.files(path='E:/Ecoregions Models/Border Bioclim/',pattern='asc', full.names=TRUE)
predictors<-stack(files)
##subset the main shape file into 12 individual shapefiles for the regions of interest
ER_11.1<-Level.2.ecoregs[Level.2.ecoregs$NA_L2CODE=="11.1",]...
我試圖使用extract
功能拔出5000隨機shape文件指出每個生態區域並將它們保存爲不同的對象。
我無法將單個ecoregion對象投影到柵格文件上。 我已經改變了投影,但仍然存在問題。
>bio_1
class : RasterLayer
dimensions : 324, 444, 143856 (nrow, ncol, ncell)
resolution : 0.08333333, 0.08333333 (x, y)
extent : -125, -88, 18.5, 45.5 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=utm +zone=48 +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
data source : E:\Ecoregions Models\Border Bioclim\ModelVariables\bio_1.asc
names : bio_1
> ER_11.1
class : SpatialPolygonsDataFrame
nfeatures : 22
extent : -1989641, -1450736, -1748693, -208349.6 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=utm +zone=48 +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
nvariables : 8
names : NA_L2CODE, NA_L2NAME, NA_L1CODE, NA_L1NAME, NA_L2KEY, NA_L1KEY, Shape_Leng, Shape_Area
min values : 11.1, MEDITERRANEAN CALIFORNIA, 11, MEDITERRANEAN CALIFORNIA, 11.1 MEDITERRANEAN CALIFORNIA, 11 MEDITERRANEAN CALIFORNIA, 331.1174, 1.483274e+08
max values : 11.1, MEDITERRANEAN CALIFORNIA, 11, MEDITERRANEAN CALIFORNIA, 11.1 MEDITERRANEAN CALIFORNIA, 11 MEDITERRANEAN CALIFORNIA, 5417939.1114, 8.472524e+04
>
這裏的問題必須在不同程度上。 有沒有人對如何在光柵包中解決這個問題有任何建議?