当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Python ArcGIS create_image_collection用法及代码示例


本文简要介绍 python 语言中 arcgis.raster.analytics.create_image_collection 的用法。

用法:

arcgis.raster.analytics.create_image_collection(image_collection, input_rasters, raster_type_name, raster_type_params=None, out_sr=None, context=None, source_mosaic_dataset=None, *, gis=None, future=False, **kwargs)

create_image_collection.png

创建将参与 ortho-mapping 项目的图像集合。提供通过引用使用输入栅格以及通过上下文参数指定图像集合属性的规定。

该函数还可以通过将数据上传到服务器,从本地栅格数据集在 ArcGIS Enterprise 和 ArcGIS Online 中创建托管影像图层。可以根据多个输入栅格创建集合。

为了使此函数在 ArcGIS Online 上运行,需要预先安装适用于 Python 的 Azure 库包(适用于 Python 的 Azure SDK - azure-storage-blob:12.1<= 版本 <=12.9)。参考https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python#install-the-package

Parameter

Description

image_collection

必需,要创建的图像集合的名称。

影像集合可以是现有影像服务,其中该函数将创建镶嵌数据集,然后现有托管影像服务将指向新的镶嵌数据集。

如果图像集合不存在,则会创建新的multi-tenant服务。

此参数可以是表示现有 image_collection 的项目,也可以是表示 image_collection 名称的字符串(现有的或要创建的。)

input_rasters

必需,要添加到正在创建的图像集合中的输入栅格列表。该参数可以是以下任意一项:

  • 图像的门户项目列表

  • 图像服务 URL

  • 共享数据路径(该路径必须可由服务器访问)

  • 门户上文件夹的名称

  • 本地栅格数据集的路径

该函数可以通过将数据上传到服务器,从本地栅格数据集创建企业和 AGOL 上的托管影像图层。

raster_type_name

必需的字符串。用于将数据添加到图像集合的栅格类型的名称。

选择清单:

[
“Aerial”, “ASTER”, “DMCII”, “DubaiSat-2”, “GeoEye-1”, “GF-1 PMS”, “GF-1 WFV”,
“GF-2 PMS”, “GRIB”, “HDF”, “IKONOS”, “Jilin-1”, “KOMPSAT-2”, “KOMPSAT-3”,
“Landsat 1-5 MSS”, “Landsat 4-5 TM”, “Landsat 7 ETM+”, “Landsat 8”, “Landsat 9”,
“NetCDF”, “PlanetScope”, “Pleiades-1”, “Pleiades NEO”, “QuickBird”, “RapidEye”,
“Raster Dataset”, “ScannedAerial”, “Sentinel-2”, “SkySat”, “SPOT 5”, “SPOT 6”,
“SPOT 7”, “Superview-1”, “Tiled Imagery Layer”, “UAV/UAS”, “WordView-1”,
“WordView-2”, “WordView-3”, “WordView-4”, “ZY3-SASMAC”, “ZY3-CRESDA”
]

如果使用 source_mosaic_dataset 参数将现有镶嵌数据集发布为动态影像图层,则 raster_type_name 参数可以设置为“无”,因为这不是必需的。

例子:

“QuickBird”

raster_type_params

可选字典。其他 raster_type 特定参数。

将栅格添加到图像集合的过程可以通过指定其他栅格类型参数来控制。

栅格类型参数参数是一个字典。

字典可以包含productType、processingTemplate、pansharpenType、Filter、pansharpenWeights、ConstantZ、dem、zoffset、CorreateGeoid、ZFactor、StretchType、ScaleFactor、ValidRange

请查看下表(支持的栅格类型),了解有关每种栅格类型的产品类型、处理模板、全色锐化权重的更多详细信息。

  • pansharpenType 的可能值 - [“Mean”、“IHS”、“Brovey”、“Esri”、“Mean”、“Gram-Schmidt”]

  • 过滤器的可能值 - [无、“Sharpen”、“SharpenMore”]

  • StretchType 字典的值可以如下:

    • “None”

    • “最小最大; <分钟>; <最大>”

    • “百分比最小最大; <最小百分比>; <最大百分比>”

    • “标准差; <标准偏差数>”

    示例:{“StretchType”:“MinMax; <分钟>; <最大>”}

  • ValidRange 字典的值可以如下:

    • “<掩码最小值>,<掩码最大值>”

    示例:{“ValidRange”: “10, 200”}

例子:

{“productType”:”All”,”processingTemplate”:”Pansharpen”, “pansharpenType”:”Gram-Schmidt”,”filter”:”SharpenMore”, “pansharpenWeights”:”0.85 0.7 0.35 1”,”constantZ”:-9999}

out_sr

可选整数。服务的附加参数。

可以指定以下附加参数:

  • image_collection的空间参考;输入几何的空间参考或空间参考字典对象的众所周知的 ID。

如果栅格类型名称设置为“UAV/UAS”,则输出图像集合的空间参考将由定义的栅格类型参数确定。

context

可选字典。上下文参数用于提供附加输入参数。

语法:{“image_collection_properties”: {“imageCollectionType”:”卫星”},”byref”:True}

使用 image_collection_properties 键设置 imageCollectionType 的值。

注意:

“imageCollectionType” 属性对于图像收集非常重要,稍后将通过正射映射系统服务进行调整。根据影像采集类型,正射测绘系统服务会选择不同的算法进行调整。因此,如果图像集合是通过引用创建的,则请求者应使用以下关键字根据图像集合中图像的类型设置此属性。如果未设置imageCollectionType,则默认为“UAV/UAS”

如果byref设置为“True”,则不会上传数据。如果未设置,则默认为“False”

当尝试从本地栅格数据集在 ArcGIS Online 中创建托管影像图层时,upload_properties 键可用于控制特定上传参数。

可用选项:

  • maxUploadConcurrency:可选整数。用于大型上传的最大并行连接数(当单个文件/blob 大小超过 64MB 时)。这是max_concurrency的参数BlobClient.upload_blob()方法。 (默认为 6)

  • maxWorkerThreads:可选整数。上传多个文件时异步执行的最大线程数。这是max_workers的参数ThreadPoolExecutor()类。 (默认为无)

  • displayProgress:可选布尔值。如果设置为 True,将显示一个进度条,用于跟踪上传到用户光栅存储的进度。 (默认为False)

    Example:

    {“upload_properties”:{“maxUploadConcurrency”:8,
    “maxWorkerThreads”:20,
    “displayProgress”:True}
    }

context 参数还可用于指定是否构建概述、构建封装、指定表示 NoData 等的像素值。

例子:

{“buildFootprints”:True,
“footprintsArguments”:{“method”:”RADIOMETRY”,”minValue”:1,”maxValue”:5,
“shrinkDistance”:50,”skipOverviews”:True,”updateBoundary”:True,
“maintainEdge”:False,”simplification”:None,”numVertices”:20,
“minThinnessRatio”:0.05,”maxSliverSize”:20,”requestSize”:2000,
“minRegionSize”:100},
“defineNodata”:True,
“noDataArguments”:{“noDataValues”:[500],”numberOfBand”:99,”compositeValue”:True},
“buildOverview”:True}

上下文参数可用于在创建图像集合时添加新字段。

例子:

{“fields”: [{“name”: “cloud_cover”, “type”: “Long”},
{“name”: “cloud_shadow_count”, “type”: “Long”}]}

source_mosaic_dataset

可选字符串。要发布为托管动态影像图层的现有镶嵌数据集的路径。

要发布现有镶嵌数据集,请在 input_rasters 参数中指定镶嵌输入数据的路径。数据将上传至ArcGIS Online。

raster_type_name 参数可以设置为“无”,因为不需要从镶嵌数据集发布影像图层。

注意:

该选项仅适用于 ArcGIS 在线

例子:

“./data/temp_uploaded.gdb/test”

gis

仅关键字参数。可选的 GIS 对象。运行该工具的 GIS。如果未指定,则使用活动 GIS。

future

仅关键字参数。可选的布尔值。如果为 True,则结果将是一个 GPJob 对象,并且结果将异步返回。

folder

仅关键字参数。可选的 str 或 dict。使用给定的文件夹名称在门户中创建一个文件夹(如果不存在),并将输出保留在此文件夹中。 create_folder() 返回的字典也可以作为输入传入。

例子:

{‘username’: ‘user1’,
‘id’: ‘6a3b77c187514ef7873ba73338cf1af8’,
‘title’: ‘trial’}
返回

影像图层项目

Supported Raster Types

Raster Type

pansharpenWeights

productType

processingTemplate

“QuickBird”

“0.85, 0.7, 0.35, 1”

“All” (default), “Basic”, “Orthorectified”, “Standard Orthoready”, “Standard”

“All Bands”, “Multispectral”, “Multispectral AComp”, “Panchromatic”, “Panchromatic AComp”, “Pansharpen”, “Pansharpen AComp”, “Pansharpen and Multispectral” (default)

“Orthorectified Acomp”, “Standard AComp”, “Standard OrthoreadyAcomp”

“Multispectral AComp” (default), “Panchromatic AComp”, “Pansharpen AComp”

“DubaiSat-2”

“0.166,0.167,0.167,0.5”

“All” (default), “Geo”, “Radio”

“All Bands”, “Multispectral”, “Panchromatic”, “Pansharpen”, “Pansharpen and Multispectral” (default)

“GF-1 PMS”

“0.2501,0.3646,0,0.3853”

“All” (default), “LEVEL 1”

“All Bands”, “Multispectral” , “Panchromatic”, “Pansharpen”, “Pansharpen and Multispectral” (default)

“GF-1 WFV”

“All” (default), “LEVEL 1”

“Multispectral” (default)

“GF-2 PMS”

“0.2501,0.3646,0,0.3853”

“All” (default), “LEVEL 1”

“All Bands”, “Multispectral” , “Panchromatic”, “Pansharpen”, “Pansharpen and Multispectral” (default)

“KOMPSAT-2”

“0.166,0.167,0.167,0.5”

“All” (default), “KOMPSAT-2 Scene 1A”, “KOMPSAT-2 Scene 2A”

“All Bands”, “Multispectral”, “Panchromatic”, “Pansharpen”, “Pansharpen and Multispectral” (default)

“KOMPSAT-3”

“0.166,0.167,0.167,0.5”

“All” (default), “Level 1G”, “Level 1O” “Level 1R”

“All Bands”, “Multispectral” , “Panchromatic”, “Pansharpen”, “Pansharpen and Multispectral” (default)

“Landsat 9”

“0.42, 0.51, 0.07, 0.0”

“All” (default)

“All Bands”, “Brightness Temperature”, “Cirrus”, “Cloud”,”Landcover”, “Multiband”, “Multispectral”, “Panchromatic”, “Pansharpen”, “Pansharpen and Multispectral” (default),”QA”, “SnowIce”, “Spectral Indices”, “Surface Reflectance”, “Thermal”, “Top of Atmosphere Reflectance”, “Vegetation”, “Water” “Surface Temperature”

“Level1”

“All Bands”, “Cirrus”, “Cloud”,”Landcover”, “Multiband”, “Multispectral”, “Panchromatic”, “Pansharpen”, “Pansharpen and Multispectral” (default),”QA”, “SnowIce”, “Thermal”, “Vegetation”, “Water”

“Surface Reflectance”

“Surface Reflectance”

“Spectral Indices”

“Spectral Indices”

“Top of Atmosphere Reflectance”

“Top of Atmosphere Reflectance”

“Brightness Temperature”

“Brightness Temperature”

“Surface Temperature”

“Surface Temperature”

“Landsat 8”

“0.42, 0.51, 0.07, 0.0”

“All” (default)

“All Bands”, “Brightness Temperature”, “Cirrus”, “Cloud”,”Landcover”, “Multiband”, “Multispectral”, “Panchromatic”, “Pansharpen”, “Pansharpen and Multispectral” (default),”QA”, “SnowIce”, “Spectral Indices”, “Surface Reflectance”, “Thermal”, “Top of Atmosphere Reflectance”, “Vegetation”, “Water” “Surface Temperature”

“Level1”

“All Bands”, “Cirrus”, “Cloud”,”Landcover”, “Multiband”, “Multispectral”, “Panchromatic”, “Pansharpen”, “Pansharpen and Multispectral” (default),”QA”, “SnowIce”, “Thermal”, “Vegetation”, “Water”

“Surface Reflectance”

“Surface Reflectance”

“Spectral Indices”

“Spectral Indices”

“Top of Atmosphere Reflectance”

“Top of Atmosphere Reflectance”

“Brightness Temperature”

“Brightness Temperature”

“Surface Temperature”

“Surface Temperature”

“Landsat 7 ETM+”

“0.11, 0.14, 0.14, 0.61”

“All” (default)

“All Bands”, “Brightness Temperature”, “Cirrus”, “Cloud”,”Landcover”, “Multiband”, “Multispectral”, “Panchromatic”, “Pansharpen”, “Pansharpen and Multispectral” (default),”QA”, “SnowIce”, “Spectral Indices”, “Surface Reflectance”, “Thermal”, “Top of Atmosphere Reflectance”, “Vegetation”, “Water” “Surface Temperature”

“Level1”

“All Bands”, “Cirrus”, “Cloud”,”Landcover”, “Multiband”, “Multispectral”, “Panchromatic”, “Pansharpen”, “Pansharpen and Multispectral” (default),”QA”, “SnowIce”, “Thermal”, “Vegetation”, “Water”

“Surface Reflectance”

“Surface Reflectance”

“Spectral Indices”

“Spectral Indices”

“Top of Atmosphere Reflectance”

“Top of Atmosphere Reflectance”

“Brightness Temperature”

“Brightness Temperature”

“Surface Temperature”

“Surface Temperature”

“Landsat 4-5 TM”

“All” (default)

“All Bands”, “Brightness Temperature”, “Cirrus”, “Cloud”,”Landcover”, “Multiband”, “Multispectral” (default), “Panchromatic”, “Pansharpen”, “Pansharpen and Multispectral”, “QA”, “SnowIce”, “Spectral Indices”, “Surface Reflectance”, “Thermal”, “Top of Atmosphere Reflectance”, “Vegetation”, “Water” “Surface Temperature”

“Level1”

“All Bands”, “Cirrus”, “Cloud”,”Landcover”, “Multiband”, “Multispectral” (default), “Panchromatic”, “Pansharpen” , “Pansharpen and Multispectral”, “QA”, “SnowIce”, “Thermal”, “Vegetation”, “Water”

“Surface Reflectance”

“Surface Reflectance”

“Spectral Indices”

“Spectral Indices”

“Top of Atmosphere Reflectance”,

“Top of Atmosphere Reflectance”,

“Brightness Temperature”,

“Brightness Temperature”,

“Surface Temperature”

“Surface Temperature”

“Landsat 1-5 MSS”

“All” (default), “Level1”

“All Bands”, “Multiband”, “Multispectral” (default), “Pseudocolor”, “Thermal”, “QA”

“Sentinel-2”

“0.85, 0.7, 0.35, 1”

“ALL” (default)

“All Bands”, “BOA Reflectance-10m”, “BOA Reflectance-20m”, “BOA Reflectance-60m”, “Multispectral” (default), “Multispectral-10m”, “Multispectral-20m”, “Multispectral-60m”, “True Color”, “SCL-20m”, “SCL-60m” “Aerosol Optical Thickness”, “Water Vapour”, “BOA Reflectance”

“Level1”

“Multispectral” (default), “Multispectral-10m”, “Multispectral-20m”, “Multispectral-60m”, “True Color”

“Level2”

“BOA Reflectance-10m”, “BOA Reflectance-20m”, “BOA Reflectance-60m” “Aerosol Optical Thickness”, “Water Vapour”, “BOA Reflectance”

“GeoEye-1”

“0.41, 0.16, 0.13, 0.3”

“All” (default), “Basic”, “Geo”, “GeoProfessional” “Orthorectified”, “Standard”, “Standard Orthoready”,

“All Bands”, “Multispectral”, “Multispectral AComp”, “Panchromatic”, “Panchromatic AComp”, “Pansharpen”, “Pansharpen AComp”, “Pansharpen and Multispectral” (default)

“Orthorectified Acomp”, “Standard AComp”, “Standard OrthoreadyAcomp”

“Multispectral AComp” (default), “Panchromatic AComp”, “Pansharpen AComp”

“Pleiades-1”

“0.9, 0.75, 0.5, 0.5”

“All” (default), “ORTHO”, “PRIMARY”, “PROJECTED”

“All Bands”, “Multispectral”, “Multispectral Display”, “Multispectral Reflectance”, “Panchromatic”, “Panchromatic Display”, “Panchromatic Reflectance”, “Pansharpen” “Pansharpen and Multispectral” (default), “Pansharpen Display”, “Pansharpen Reflectance”

“ORTHO DISPLAY”

“Multispectral Display” (default), “Panchromatic Display”, “Pansharpen Display”

“ORTHO REFLECTANCE”

“Multispectral Reflectance” (default), “Panchromatic Reflectance”, “Pansharpen Reflectance”

“PRIMARY DISPLAY”

“Multispectral Display” (default), “Panchromatic Display”, “Pansharpen Display”

“PRIMARY REFLECTANCE”

“Multispectral Reflectance” (default), “Panchromatic Reflectance”, “Pansharpen Reflectance”

“PROJECTED DISPLAY”

“Multispectral Display” (default), “Panchromatic Display”, “Pansharpen Dispplay”

“PROJECTED REFLECTANCE”

“Multispectral Reflectance” (default), “Panchromatic Reflectance”, “Pansharpen Reflectance”

“Pleiades Neo”

“0.45, 0.55, 0, 0”

“All” (default), “ORTHO”, “PRIMARY”, “PROJECTED”

“All Bands”, “Multispectral”, “Multispectral Display”, “Multispectral Reflectance”, “Panchromatic”, “Panchromatic Display”, “Panchromatic Reflectance”, “Pansharpen” “Pansharpen and Multispectral” (default), “Pansharpen Display”, “Pansharpen Reflectance”

“ORTHO DISPLAY”

“Multispectral Display” (default), “Panchromatic Display”, “Pansharpen Display”

“ORTHO REFLECTANCE”

“Multispectral Reflectance” (default), “Panchromatic Reflectance”, “Pansharpen Reflectance”

“PRIMARY DISPLAY”

“Multispectral Display” (default), “Panchromatic Display”, “Pansharpen Display”

“PRIMARY REFLECTANCE”

“Multispectral Reflectance” (default), “Panchromatic Reflectance”, “Pansharpen Reflectance”

“PROJECTED DISPLAY”

“Multispectral Display” (default), “Panchromatic Display”, “Pansharpen Dispplay”

“PROJECTED REFLECTANCE”

“Multispectral Reflectance” (default), “Panchromatic Reflectance”, “Pansharpen Reflectance”

“SPOT 5”

“0.166,0.167,0.167,0.5”

“All” (default), “SPOT Scene 1A”, “SPOT Scene 2A”, “SPOTView Ortho”

“All Bands”, “Multispectral”, “Panchromatic”, “Pansharpen”, “Pansharpen and Multispectral” (default), “Pseudocolor”

“SPOT 6”

“0.45, 0.55, 0, 0”

“All” (default), “ORTHO”, “PRIMARY”, “PROJECTED”

“All Bands”, “Multispectral”, “Multispectral Display”, “Multispectral Reflectance”, “Panchromatic”, “Panchromatic Display”, “Panchromatic Reflectance”, “Pansharpen”, “Pansharpen and Multispectral” (default), “Pansharpen Display”, “Pansharpen Reflectance”

“ORTHO DISPLAY”

“Multispectral Display” (default), “Panchromatic Display”, “Pansharpen Display”

“ORTHO REFLECTANCE”

“Multispectral Reflectance” (default), “Panchromatic Reflectance”, “Pansharpen Reflectance”

“PRIMARY DISPLAY”

“Multispectral Display” (default), “Panchromatic Display”, “Pansharpen Display”

“PRIMARY REFLECTANCE”

“Multispectral Reflectance” (default), “Panchromatic Reflectance”, “Pansharpen Reflectance”

“PROJECTED DISPLAY”

“Multispectral Display” (default), “Panchromatic Display”, “Pansharpen Dispplay”

“PROJECTED REFLECTANCE”

“Multispectral Reflectance” (default), “Panchromatic Reflectance”, “Pansharpen Reflectance”

“SPOT 7”

“0.45, 0.55, 0, 0”

“All” (default), “ORTHO”, “PRIMARY”, “PROJECTED”

“All Bands”, “Multispectral”, “Multispectral Display”, “Multispectral Reflectance”, “Panchromatic”, “Panchromatic Display”, “Panchromatic Reflectance”, “Pansharpen” “Pansharpen and Multispectral” (default), “Pansharpen Display”, “Pansharpen Reflectance”

“ORTHO DISPLAY”

“Multispectral Display” (default), “Panchromatic Display”, “Pansharpen Display”

“ORTHO REFLECTANCE”

“Multispectral Reflectance” (default), “Panchromatic Reflectance”, “Pansharpen Reflectance”

“PRIMARY DISPLAY”

“Multispectral Display” (default), “Panchromatic Display”, “Pansharpen Display”

“PRIMARY REFLECTANCE”

“Multispectral Reflectance” (default), “Panchromatic Reflectance”, “Pansharpen Reflectance”

“PROJECTED DISPLAY”

“Multispectral Display” (default), “Panchromatic Display”, “Pansharpen Dispplay”

“PROJECTED REFLECTANCE”

“Multispectral Reflectance” (default), “Panchromatic Reflectance”, “Pansharpen Reflectance”

“IKONOS”

“0.378, 0.211, 0, 0.411”

“All” (default), “Geo”, “GeoProfessional”,

“All Bands”, “Multispectral”, “Panchromatic”, “Pansharpen” “Pansharpen and Multispectral” (default),

“WorldView-1”

“All” (default), “Basic”, “Orthorectified”, “Standard”, “Standard Orthoready”

“Panchromatic” (default)

“WorldView-2”

“0.39, 0.23, 0.21, 0.17”

“All” (default), “Basic”, “Orthorectified”, “Standard Orthoready”, “Standard”

“All Bands”, “Multispectral”, “Multispectral AComp” “Panchromatic”, “Panchromatic AComp”, “Pansharpen AComp”, “Pansharpen” “Pansharpen and Multispectral” (default)

“Orthorectified Acomp”, “Standard AComp”, “Standard OrthoreadyAcomp”

“Multispectral AComp” (default), “Panchromatic AComp”, “Pansharpen AComp”

“WorldView-3”

“0.38, 0.25, 0.2, 0.16”

“All” (default), “Basic”, “Orthorectified”, “Standard Orthoready”, “Standard”

“All Bands”, “Multispectral”, “Multispectral AComp” “Panchromatic” , “Panchromatic AComp”, “Pansharpen”, “Pansharpen AComp”, “Pansharpen and Multispectral” (default), “SWIR”

“Orthorectified Acomp”, “Standard AComp”, “Standard OrthoreadyAcomp”

“Multispectral AComp” (default), “Panchromatic AComp”, “Pansharpen AComp”

“WorldView-4”

“0.39, 0.23, 0.21, 0.17”

“All” (default), “Basic”, “Standard OrthoReady”

“All Bands” “Multispectral”, “Panchromatic” “Pansharpen” , “Pansharpen and Multispectral” (default), “Multispectral AComp”, “Panchromatic AComp”, “Pansharpen AComp”

“ZY3-SASMAC”

“0.329, 0.509, 0, 0.162”

“All” (default), “LEVEL1”

“All Bands” “Double Line Stereo”, “Multispectral”, “Panchromatic”, “Panchromatic BWD”, “Panchromatic FWD”, “Panchromatic NAD”, “Pansharpen” “Pansharpen and Multispectral” (default) “Three Line Stereo”

“Raster Dataset”

“NetCDF”

“All” (default)

“Default”(default), “Multiband Composite”, “Vector Field”

“GRIB”

“All” (default)

“Default”(default), “Multiband Composite”, “Vector Field”

“HDF”

“All” (default)

“Default”(default), “Multiband Composite”, “Vector Field”

“ASTER”

“All” (default), “L1T”, “L1B”, “Surface Reflectance” “Surface Radiance”, “Surface Emissivity” “Surface Kinetic Temperature” “DEM” “Registered Radiance”

“VNIR” (default), “SWIR”, “TIR”, “Multispectral” (default), “TIR - Surface Emissivity”, “VNIR - Surface Reflectance”, “SWIR - Surface Reflectance”, “TIR - Surface kinetic Temperature”, “VNIR - Surface Radiance”, “SWIF - Surface Radiance”, “TIR - Surface Radiance”, “VNIR - Registered Radiance”, “VNIR - Registered Radiance”, “SWIR - Registered Radiance”, “TIR - Registered Radiance”, “Global Digital Elevation Model (ASTGTM)”, “Digital Elevation Model”, “All Bands”

“DMCii”

“All” (default), “L1R”, “L1T”

“Multispectral” (default), “ALL”, “Pseudocolor”

“RapidEye”

“All”, “Level1B”, “Level3A”, “Level3B”

“Multispectral” (default)

“SkySat”

“0.41, 0.16, 0.13, 0.3”

“All” (default), “Basic”, “Ortho”

“All Bands”, “Multispectral”, “Panchromatic”, “Pansharpen” , “Skysat Pansharpen”, “Visual” “Pansharpen and Multispectral” (default)

“Jilin-1”

“0.2501, 0.3646, 0”

“All” (default), “LEVEL1”

“All Bands”, “Multispectral”, “Panchromatic”, “Pansharpen” , “Pansharpen and Multispectral” (default)

“PlanetScope”

“0.166,0.167,0.167,0.5”

“All” (default), “Level1”, “Level3”

“Multispectral” (default)

“SuperView-1”

“0.85, 0.7, 0.35, 1”

“All” (default), “LEVEL1B”, “LEVEL2A”, “LEVEL3A”

“All Bands”, “Multispectral”, “Panchromatic”, “Pansharpen” , “Pansharpen and Multispectral” (default)

例子:

# Usage Example 1: create image collection using a list of image items.

image_item_list = [<Item title:"YUN_0040.JPG" type:Image owner:admin>,
                   <Item title:"YUN_0041.JPG" type:Image owner:admin>,
                   <Item title:"YUN_0042.JPG" type:Image owner:admin>,
                   <Item title:"YUN_0043.JPG" type:Image owner:admin>,
                   <Item title:"YUN_0044.JPG" type:Image owner:admin>]

params = {"gps": [['YUN_0040.JPG', 34.0069887, -117.09279029999999],
                  ['YUN_0041.JPG', 34.0070131, -117.09311519972222],
                  ['YUN_0042.JPG', 34.0070381, -117.09346329972222],
                  ['YUN_0043.JPG', 34.00706339972222, -117.09381479999999],
                  ['YUN_0044.JPG', 34.0070879, -117.09416449999999]],
          "cameraProperties":{"maker":"Yuneec",
                              "model":"E90",
                              "focallength":8,
                              "columns":5472,
                              "rows":3648,
                              "pixelsize":0.0024},
          "isAltitudeFlightHeight":"false",
          "averagezdem": {"url": "https://rais.dev.geocloud.com/arcgis/rest/services/Hosted/WorldSRTM90m/ImageServer"}}

img_coll_result = create_image_collection(image_collection="imageCollection",
                                          input_rasters=image_item_list,
                                          raster_type_name="UAV/UAS",
                                          raster_type_params=params,
                                          out_sr=32632)

# Usage Example 2: This example creates an image collection from the datasets detected in the input folder.

img_coll_result = create_image_collection(image_collection="imageCollection",
                                          input_rasters=r"C:\data",
                                          raster_type_name="Raster Dataset",
                                          gis=gis)

# Usage Example 3: This example creates an image collection using Landsat 1-5 MSS Raster Type with a Level 1 product and a Multispectral template.

landsat15_collection = create_image_collection(image_collection="landsat15_collection",
                                               input_rasters=r"C:\data\Landsat15MSS",
                                               raster_type_name="Landsat 1-5 MSS",
                                               raster_type_params={"productType": "Level1", "processingTemplate": "Multispectral"},
                                               gis=gis)

# Usage Example 4: This example creates an image collection using Sentinel-2 Raster Type with a Level 1 product and a Multispectral template.

sentinel2_collection = create_image_collection(image_collection="sentinel2_collection",
                                               input_rasters=r"C:\data\Sentinel2",
                                               raster_type_name="Sentinel-2",
                                               raster_type_params={"productType": "Level1", "processingTemplate": "Multispectral-10m"},
                                               gis=gis)

# Usage Example 5: This example creates an image collection using Pleiades-1 Raster Type with an Ortho product and a Pansharpened template.

pleiades1_collection = create_image_collection(image_collection="pleiades1_collection",
                                               input_rasters=r"C:\data\Pleiades1",
                                               raster_type_name="Pleiades-1",
                                               raster_type_params={"productType":"ORTHO","processingTemplate":"Pansharpen"},
                                               gis=gis)

# Usage Example 6: This example creates an image collection using SPOT 6 Raster Type with an Ortho Reflectance product and a Pansharpen Reflectance template.

spot6_collection = create_image_collection(image_collection="spot6_collection",
                                           input_rasters=r"C:\data\SPOT6",
                                           raster_type_name="SPOT 6",
                                           raster_type_params={"productType": "ORTHO REFLECTANCE", "processingTemplate": "Pansharpen Reflectance"},
                                           gis=gis)

# Usage Example 7: This example creates an image collection using WorldView-2 Raster Type with a Pansharpen and Multispectral template.

worldview2_collection = create_image_collection(image_collection="worldview2_collection",
                                                input_rasters=r"C:\data\WorldView",
                                                raster_type_name="WorldView-2",
                                                raster_type_params= {"productType": "Basic", "processingTemplate": "Pansharpen and Multispectral"},
                                                gis=gis)

# Usage Example 8: This example creates an image collection from Tiled Imagery Layers.

tiled_layers_collection = create_image_collection(image_collection="tiled_collection",
                                                  input_rasters=[tile_lyr_input1, tile_lyr_input2],
                                                  raster_type_name="Tiled Imagery Layer",
                                                  gis=gis)

# Usage Example 9: This example creates an image collection on ArcGIS Enterprise from datastore by reference.

sentinel_by_ref_collection = create_image_collection(image_collection="sentinel_by_ref_multispectral",
                                                     input_rasters=["/rasterStores/LocalRasterStore/S2A_MSIL1C_20180624T184921_N0206_R113_T10SEJ_20180624T234856.SAFE",
                                                                    "/rasterStores/LocalRasterStore/S2B_MSIL1C_20180622T185919_N0206_R013_T10SEJ_20180622T205930.SAFE"
                                                                   ],
                                                     raster_type_name="Sentinel-2",
                                                     raster_type_params={"productType":"All","processingTemplate":"Multispectral"},
                                                     context={"image_collection_properties":{"imageCollectionType":"Satellite"},"byref":True},
                                                     gis = gis)

# Usage Example 10: This example publishes an existing mosaic dataset as a dynamic imagery layer in ArcGIS Online. 

# Specify the actual source data path referenced by the uploaded mosaic dataset using input_rasters parameter. The data would be uploaded 
# to the ArcGIS Online's user store from this path. 

landsat_mosaic  = create_image_collection(image_collection="landsat_image_collection",
                                          input_rasters=[r"C:\data\landsat_data_folder"],
                                          raster_type_name=None,
                                          context={"upload_properties":{"displayProgress":True}},
                                          source_mosaic_dataset=r"C:\data\md.gdb\landsat",
                                          gis=gis)

相关用法


注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 arcgis.raster.analytics.create_image_collection。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。