我从worldwildlife.org下载了一份有关世界陆地生态区域的shapefile文件。该文件可在以下链接中加载:http://worldwildlife.org/publications/terrestrial-ecoregions-of-the-world。
这是一个标准的shapefile文件,我想对它进行两种操作: 第一步:将本地目录中的shapefile裁剪到东北美洲的范围(ext = extent(-95,-50,24,63))。
这是一个标准的shapefile文件,我想对它进行两种操作: 第一步:将本地目录中的shapefile裁剪到东北美洲的范围(ext = extent(-95,-50,24,63))。
# Read shapefile using package "maptools"
eco_shp <- readShapeLines("F:/01_2013/Ecoregions/Global/wwf_terr_ecos.shp",
proj4string=CRS("+proj=utm +zone=33 +datum=WGS84"))
# Set the desired extent for the final raster using package "raster"
ext <- extent(-95, -50, 24, 63)
我确定我需要使用"raster"包中的栅格化函数,但我仍然无法正确地使用它。希望能得到关于如何使用它的任何建议。
overlay
)? - mneloverlay
函数将提取网格点处的值,然后可以保存为ASCII文件。 - mnel