ArcGIS Python

1.遍历指定文件夹下的Grid格式的Raster

import arcpy
arcpy.env.workspace = "D:\GLC_2000\China_gridv3\Grid"
rasters = arcpy.ListRasters("*", "GRID")
for raster in rasters:
    print(raster)

结果:

china_v3
china_v3_pro

2.遍历指定文件夹下的ShapeFile数据

features=arcpy.ListFeatureClasses("*","shp")

你可能感兴趣的:(ArcGIS Python)