【ArcGIS随笔系列】ArcGIS Pro STAC 功能介绍 - 连接Microsoft Planetary Computer (MPC)获取在线遥感影像(ArcGIS Pro 3.2及以上)

简述


本文将介绍如何使用ArcGIS Pro 3.2连接到微软Planetary Computer中的Landsat Collection,在ArcGIS Pro客户端实现对Landsat数据的检索、加载到镶嵌数据集中以及进行后续分析。
微软 Planetary Computer


步骤

创建镶嵌数据集



创建云存储连接文件

获取创建云存储连接文件所需参数

  1. 在Data Catalog页面寻找需要的数据集(https://planetarycomputer.microsoft.com/catalog
  2. 以Landsat Collection 2 Level-2数据集(https://planetarycomputer.microsoft.com/dataset/landsat-c2-l2)为例,单击其中的STAC Collection链接。

  1. 在页面中查询三个参数,分别是 ID、msft:container和msft:storage_account。本例中,ID为“landsat-c2-l2”,msft:container为“landsat-c2”,msft:storage_account为“landsateuwest”。

  1. 在使用创建云存储连接文件工具时,需要以上几个参数,其中

    a. Access Key ID(Account Name)对应上面的msft:storage_account参数
    
    b. Bucket(Container)Name对应上面的msft:container参数
    
    c. 连接到数据集需要使用MPC的认证服务,首先将ARC_TOKEN_OPTION_NAME 的参数设为AZURE_STORAGE_SAS_TOKEN,即表示将使用SAS TOKEN进行认证。接下来提供ARC_TOKEN_SERVICE_API参数(token生成api),需要按以下标准进行构建, [https://planetarycomputer.microsoft.com/api/sas/v1/token/collection_id](https://planetarycomputer.microsoft.com/api/sas/v1/token/collection_id),其中需要用上面获取的id参数替换链接中的collection_id项
    

token生成的两种方式:



方法1:使用“Create Cloud Storage Connection File”工具创建云存储连接文件



服务端关键参数

provider = "Azure"
accesskey = "landsateuwest"
secretkey = ""
bucketname = "landsat-c2"
folder = ""
region = ""
endpoint = ""
config_options= "ARC_TOKEN_OPTION_NAME AZURE_STORAGE_SAS_TOKEN; ARC_TOKEN_SERVICE_API https://planetarycomputer.microsoft.com/api/sas/v1/token/landsateuwest/landsat-c2"

方法2:使用Python脚本创建

import arcpy

outfolder = "C:\Test\STAC_TEST"
connectname = "planetary_landsat.acs"
provider = "Azure"
accesskey = "landsateuwest"
secretkey = ""
bucketname = "landsat-c2"
folder = ""
region = ""
endpoint = ""
config_options= "ARC_TOKEN_OPTION_NAME AZURE_STORAGE_SAS_TOKEN; ARC_TOKEN_SERVICE_API https://planetarycomputer.microsoft.com/api/sas/v1/token/landsateuwest/landsat-c2"

# Create connection to planetary computer landsat data collection

print(arcpy.CreateCloudStorageConnectionFile_management(outfolder, connectname, provider, bucketname, accesskey, secretkey, region, endpoint, config_options, folder))
print(arcpy.GetMessages())

查看创建的云存储连接



使用已创建好的云存储连接文件

在此地址(https://github.com/Esri/arcgis-for-mpc/tree/main/AMPC_Resources/ACS_Files)可下载Esri针对MPC资源里的各数据集预创建好的云存储连接文件,可直接使用。



创建STAC连接



配置STAC连接

连接到Microsoft Planetary Computer STAC:

  1. Connection Name:取一个连接名称
  2. Connections:在这里从下拉菜单中选择预设的“Microsoft Planetary Computer”,若是其他STAC资源,需要填入资源URL地址
  3. Cloud Storage Connection:选择刚创建云存储连接文件



影像检索

进入检索界面

选中刚创建的STAC连接,点击右键,选择Search STAC Items



选择数据集

选择“landsat-c2-l2”数据集



指定时间范围



指定空间搜索范围



指定属性搜索条件

本例中搜索平台为“lansat-9”卫星,且云量小于10%



查看搜索结果

切换到“result”标签页查看搜索结果



将影像加载至镶嵌数据集

选中其中的一个影像,加载至镶嵌数据集

在弹出的“添加栅格至镶嵌数据集”工具中,选择之前创建好的镶嵌数据集,栅格类型选择Landsat9,处理模板选择地表反射率(Surface Reflectance),点击运行。



查看镶嵌数据集

查看镶嵌数据集并设置拉伸



影像分析

尝试裁剪功能,成功



结论

  1. 提供的ArcGIS Pro 3.2中的STAC功能可快速连接到STAC节点
  2. 可提供镶嵌数据集的所有功能,例如分析

参考文档

Introduction to the STAC UI in ArcGIS Pro

Microsoft Planetary Computer

Microsoft Planetary Computer STAC - unable to add image to moasic dataset in ArcGIS Pro


我的其他文章


  1. 【科技前沿】零代码构建台风监测大屏:Experience Builder赋能风云气象卫星(FY-4A)应用
  2. 风云四号(FY-4A)气象卫星数据处理及应用:使用GeoScene Pro/ArcGIS Pro实现台风实时路径追踪与可视化
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值