我目前正在使用以下脚本将表中的某些属性数据添加到很多单独的shapefile中:
library(rgdal)
specieslist <- read.csv("SpeciesList1.txt", header=F)
attdata <- read.table("TestAtt.csv", sep = ",", header=T)
for (n in 1:dim(specieslist)[1])
{
speciesname <- specieslist[n,1]
shp <- readOGR("Mesoamerica_modified_polygons", speciesname)
shp$ENGL_NAME<-attdata[n,2]
writeOGR(shp, "PolygonsV2", speciesname, driver="ESRI Shapefile")
}
最后我得到以下警告:
1: In writeOGR(shp, "PolygonsV2", speciesname, driver = "ESRI Shapefile") :
Field names abbreviated for ESRI Shapefile driver
在此过程之后查看shapefile的属性表时,字段名称已缩短为“ ENGL_”,但我希望它保持为“ ENGL_NAME”。有没有办法关闭此缩写?
任何帮助,不胜感激。