我有一个脚本,每天下载一个zip文件并提取shapefile。这很好,但shapefile的格式始终为“多边形.yyyymmdd.shp““
当我试图将这个文件复制到一个地理数据库时,我总是出错。我猜是因为shapefile名称中有一个句点(不知道他们为什么使用这种命名结构)。在
错误是“RuntimeError:Object:error in executing tool”
shpList = arcpy.ListFeatureClasses()
print shpList
>>>[u'polygons.20150316.shp']
polyFc = "C:\\data\\work.gdb\\" + "polyFc"
arcpy.CopyFeatures_management(shpList, polyFc)
地理处理工具将反对shapefile(和dbase文件),在它们的名称中加上一个句点。在使用CopyFeatures和其他工具之前,需要重命名这些文件。在
相关问题 更多 >
编程相关推荐