摘要
返回与元数据文件关联的栅格产品的路径列表。
语法
ListRasterProducts (metadata_file_path)
参数 | 说明 | 数据类型 |
metadata_file_path | The path to the metadata file. | String |
数据类型 | 说明 |
String | metadata_file_path 参数值的所有栅格产品的路径列表。 如果数据类型不受支持,或者没有与元数据文件关联的栅格产品,则返回空列表。 |
代码示例
列出与 Landsat 8 元数据文件 (*_MTL.txt) 关联的栅格产品列表。
import arcpy
arcpy.ListRasterProducts(r'c:\temp\LC80390382013135LGN01\LC80390382013135LGN01_MTL.txt')
# For example:
# ['c:\\temp\\LC80390382013135LGN01\\LC80390382013135LGN01_MTL.txt\\Multispectral',
# 'c:\\temp\\LC80390382013135LGN01\\LC80390382013135LGN01_MTL.txt\\QA',
# 'c:\\temp\\LC80390382013135LGN01\\LC80390382013135LGN01_MTL.txt\\Panchromatic',
# 'c:\\temp\\LC80390382013135LGN01\\LC80390382013135LGN01_MTL.txt\\Multiband',
# 'c:\\temp\\LC80390382013135LGN01\\LC80390382013135LGN01_MTL.txt\\Thermal',
# 'c:\\temp\\LC80390382013135LGN01\\LC80390382013135LGN01_MTL.txt\\Pansharpen',
# 'c:\\temp\\LC80390382013135LGN01\\LC80390382013135LGN01_MTL.txt\\Water',
# 'c:\\temp\\LC80390382013135LGN01\\LC80390382013135LGN01_MTL.txt\\Vegetation',
# 'c:\\temp\\LC80390382013135LGN01\\LC80390382013135LGN01_MTL.txt\\SnowIce',
# 'c:\\temp\\LC80390382013135LGN01\\LC80390382013135LGN01_MTL.txt\\Cirrus',
# 'c:\\temp\\LC80390382013135LGN01\\LC80390382013135LGN01_MTL.txt\\Cloud',
# 'c:\\temp\\LC80390382013135LGN01\\LC80390382013135LGN01_MTL.txt\\Landcover']