你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Stac Collection Operations - Create

创建集合
在 GeoCatalog 实例中创建新集合

POST https://contoso-catalog.gwhqfdeddydpareu.uksouth.geocatalog.spatio.azure.com/stac/collections?api-version=2025-04-30-preview

URI 参数

名称 必需 类型 说明
api-version
query True

string

minLength: 1

用于此作的 API 版本。

请求正文

名称 必需 类型 说明
description True

string

minLength: 1

产品系列的详细说明。

extent True

Extent

集合的空间和时间范围。

id True

string

minLength: 1
maxLength: 500
pattern: .*

集合的唯一标识符。

license True

string

minLength: 1

集合数据的许可证标识符。

links True

Link[]

指向相关资源和终端节点的链接。

assets

<string,  Asset>

资产

keywords

string[]

描述集合的关键字。

msft:_created

string

已创建 MSFT

msft:_updated

string

MSFT 已更新

msft:short_description

string

maxLength: 300

MSFT 简短描述

providers

Provider[]

提供集合数据的组织或个人。

stac_extensions

string[]

指向此 STAC 资源实现的 STAC 扩展的 URL。

stac_version

string

minLength: 1

Stac 版本

summaries

object

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#summaries

摘要

title

string

集合的可读标题。

type

string

minLength: 1

类型

响应

名称 类型 说明
202 Accepted

Operation

已接受请求进行处理,但尚未完成处理。

标头

  • location: string
  • operation-location: string
Other Status Codes

Azure.Core.Foundations.ErrorResponse

意外的错误响应。

标头

x-ms-error-code: string

安全性

OAuth2Auth

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
https://geocatalog.spatio.azure.com/.default

示例

StacCollectionOperations_Create

示例请求

POST https://contoso-catalog.gwhqfdeddydpareu.uksouth.geocatalog.spatio.azure.com/stac/collections?api-version=2025-04-30-preview

{
  "type": "Collection",
  "id": "test-collection-d45537668d06",
  "stac_version": "1.0.0",
  "description": "A collection for integration tests purposes",
  "links": [],
  "title": "Test Collection d45537668d06",
  "extent": {
    "spatial": {
      "bbox": [
        [
          -180,
          -90,
          180,
          90
        ]
      ]
    },
    "temporal": {
      "interval": [
        [
          "2020-01-01T00:00:00Z",
          null
        ]
      ]
    }
  },
  "license": "CC-BY-4.0"
}

示例响应

location: https://contoso.com/operationstatus
operation-location: https://contoso.com/operationstatus
{
  "id": "4e2eab39-038b-48a2-be6c-698069ed9f21",
  "status": "Pending",
  "type": "AddCollection",
  "statusHistory": [
    {
      "status": "Pending",
      "timestamp": "2025-03-11T17:06:44.1259931Z"
    }
  ],
  "creationTime": "2025-03-11T17:06:44.1259917Z",
  "collectionId": "test-collection"
}

定义

名称 说明
Asset

https://github.com/radiantearth/stac-spec/blob/v1.0.0/item-spec/item-spec.md#asset-object

表示 STAC 资产,它是与 STAC 项目关联的文件或资源。

Azure.Core.Foundations.Error

错误对象。

Azure.Core.Foundations.ErrorResponse

包含错误详细信息的响应。

Azure.Core.Foundations.InnerError

包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors

Extent

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#extent-object

表示 STAC 集合的空间和时间范围。

Link

链接模型。

参考:http://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/link.yaml

表示链接。

LinkType

链接的 MIME 类型。

Operation

空间地理目录作

OperationStatus

操作状态

OperationStatusHistoryItem

作状态历史记录项

Provider

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#provider-object

表示有关 STAC 集合和项目的数据提供程序的信息。

SpatialExtent

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#spatial-extent-object

表示带有边界框的 STAC 集合的空间范围。

StacCollection

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md

表示 STAC 集合。

TimeInterval

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#temporal-extent-object

表示具有时间间隔的 STAC 集合的时态范围。

Asset

https://github.com/radiantearth/stac-spec/blob/v1.0.0/item-spec/item-spec.md#asset-object

表示 STAC 资产,它是与 STAC 项目关联的文件或资源。

名称 类型 说明
constellation

string

获取数据的卫星星座。

created

string (date-time)

数据的创建时间戳。

description

string

资产的详细说明。

gsd

number (float)

地面采样距离(以米为单位)。

href

string

minLength: 1

资产文件的 URL。

instruments

string[]

采集数据的仪器。

mission

string

与数据关联的任务。

platform

string

获取数据的平台。

providers

Provider[]

提供数据的组织或个人。

roles

string[]

资产在项目中的角色。

title

string

资产的人类可读标题。

type

string

资产的媒体类型。

updated

string (date-time)

数据的 Last update 时间戳。

Azure.Core.Foundations.Error

错误对象。

名称 类型 说明
code

string

服务器定义的错误代码集之一。

details

Azure.Core.Foundations.Error[]

导致此报告错误的特定错误的详细信息数组。

innererror

Azure.Core.Foundations.InnerError

包含与当前对象有关错误的更具体信息的对象。

message

string

有关错误的可读的表示形式。

target

string

错误的目标。

Azure.Core.Foundations.ErrorResponse

包含错误详细信息的响应。

名称 类型 说明
error

Azure.Core.Foundations.Error

错误对象。

Azure.Core.Foundations.InnerError

包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors

名称 类型 说明
code

string

服务器定义的错误代码集之一。

innererror

Azure.Core.Foundations.InnerError

内部错误。

Extent

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#extent-object

表示 STAC 集合的空间和时间范围。

名称 类型 说明
spatial

SpatialExtent

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#spatial-extent-object

由边界框定义的空间范围。

temporal

TimeInterval

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#temporal-extent-object

由时间间隔定义的时态范围。

链接模型。

参考:http://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/link.yaml

表示链接。

名称 类型 默认值 说明
body

object

对于 POST 请求,资源可以将 HTTP 正文指定为 JSON 对象。

headers

object

映射到标头的对象键值对。 示例:{ “accept”: “application/json” }。

href

string

链接的 URL。

hreflang

string

链接资源的语言。

length

integer (int32)

链接资源的长度。

merge

boolean

False

指示客户端是否希望在访问链接之前将 body 值合并到当前请求正文中。 这仅在服务器响应 POST 请求时有效。 默认值:false。

method enum:
  • GET
  • POST
GET

指定资源所需的 HTTP 方法。 默认值:GET。

rel

string

链接的关系类型。

title

string

链接的标题。

type

LinkType

application/json

链接资源的 MIME 类型。

LinkType

链接的 MIME 类型。

说明
application/geo+json

表示 application/geo+json。

application/json

表示 application/json。

application/x-binary

表示 application/x 二进制文件。

application/x-protobuf

表示 application/x-protobuf。

application/xml

表示 application/xml。

image/jp2

表示 image/jp2。

image/jpeg

表示 image/jpeg。

image/jpg

表示 image/jpg。

image/png

表示 image/png。

image/tiff; application=geotiff

表示具有 application=geotiff 的图像/tiff。

image/webp

表示图像/webp。

text/html

表示 text/html。

text/plain

表示 text/plain。

Operation

空间地理目录作

名称 类型 说明
additionalInformation

object

有关特定作类型的其他信息元素

collectionId

string

采集 ID

creationTime

string (date-time)

创建作的 UTC 时间

error

Azure.Core.Foundations.Error

错误信息

finishTime

string (date-time)

作完成执行的 UTC 时间

id

string (uuid)

操作 ID

startTime

string (date-time)

启动作的 UTC 时间

status

OperationStatus

操作状态

statusHistory

OperationStatusHistoryItem[]

作状态的历史记录(以时间表示)

type

string

操作类型

OperationStatus

操作状态

说明
Canceled

用户取消了作

Canceling

正在取消作

Failed

作失败

Pending

作已接受并准备运行

Running

作正在运行

Succeeded

作已完成执行

OperationStatusHistoryItem

作状态历史记录项

名称 类型 说明
errorCode

string

如果状态为 failed,则会显示错误代码

errorMessage

string

如果状态为 failed,则会显示错误消息

status

OperationStatus

作的状态

timestamp

string (date-time)

设置状态的 UTC 时间

Provider

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#provider-object

表示有关 STAC 集合和项目的数据提供程序的信息。

名称 类型 说明
description

string

提供程序的说明。

name

string

minLength: 1

提供商、组织或个人的名称。

roles

string[]

提供者扮演的角色(例如,生产者、处理者、主持人)。

url

string

提供商网站的 URL。

SpatialExtent

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#spatial-extent-object

表示带有边界框的 STAC 集合的空间范围。

名称 类型 说明
bbox

number[] (double)

定义空间范围的边界框数组,格式为 [[west, south, east, north]]。

StacCollection

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md

表示 STAC 集合。

名称 类型 默认值 说明
assets

<string,  Asset>

资产

description

string

minLength: 1

产品系列的详细说明。

extent

Extent

集合的空间和时间范围。

id

string

minLength: 1
maxLength: 500
pattern: .*

集合的唯一标识符。

keywords

string[]

描述集合的关键字。

license

string

minLength: 1

集合数据的许可证标识符。

links

Link[]

指向相关资源和终端节点的链接。

msft:_created

string

已创建 MSFT

msft:_updated

string

MSFT 已更新

msft:short_description

string

maxLength: 300

MSFT 简短描述

providers

Provider[]

提供集合数据的组织或个人。

stac_extensions

string[]

指向此 STAC 资源实现的 STAC 扩展的 URL。

stac_version

string

minLength: 1
1.0.0

Stac 版本

summaries

object

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#summaries

摘要

title

string

集合的可读标题。

type

string

minLength: 1
Collection

类型

TimeInterval

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#temporal-extent-object

表示具有时间间隔的 STAC 集合的时态范围。

名称 类型 说明
interval

string[]

格式为 [[start_datetime, end_datetime]] 的时间间隔数组。