Stac Collection Render Options - Create
添加集合渲染选项
为给定集合添加渲染选项
POST https://contoso-catalog.gwhqfdeddydpareu.uksouth.geocatalog.spatio.azure.com/stac/collections/{collectionId}/configurations/render-options?api-version=2025-04-30-preview
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
collection
|
path | True |
string maxLength: 500pattern: .* |
STAC 集合的唯一标识符。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此作的 API 版本。 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| id | True |
string minLength: 1maxLength: 30 pattern: ^(?!\-|_)[a-zA-Z0-9_-]*(? |
render 选项的唯一标识符。 |
| name | True |
string maxLength: 40 |
render 选项的简短描述性名称。 |
| conditions |
要启用此渲染选项,必须位于活动马赛克 CQL 中的属性/值条件列表 |
||
| description |
string |
对 render 选项的较长描述,可用于解释其内容。 |
|
| legend |
此渲染选项的图例配置。 |
||
| minZoom |
integer (int32) maximum: 24 |
显示此图层的最小缩放级别。 |
|
| options |
string |
TiTiler 渲染选项的 URL 查询字符串编码字符串。 仅对 |
|
| type |
要应用的渲染类型(栅格或矢量)。 |
||
| vectorOptions |
用于渲染矢量瓦片的选项。 仅对 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
请求已成功。 |
|
| 201 Created |
请求已成功,因此创建了一个新资源。 |
|
| Other Status Codes |
意外的错误响应。 标头 x-ms-error-code: string |
安全性
OAuth2Auth
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| https://geocatalog.spatio.azure.com/.default |
示例
StacCollectionRenderOptions_Create
示例请求
POST https://contoso-catalog.gwhqfdeddydpareu.uksouth.geocatalog.spatio.azure.com/stac/collections/36fcb8da-9b15-49e0-b400-0d2e751e2061/configurations/render-options?api-version=2025-04-30-preview
{
"name": "Atmospheric penetration",
"description": "False color rendering with non-visible bands to reduce effects of atmospheric particles (B12, B11, B8A).",
"type": "raster-tile",
"options": "nodata=0&assets=B12&assets=B11&assets=B8A&color_formula=Gamma RGB 3.7 Saturation 1.5 Sigmoidal RGB 15 0.35",
"vectorOptions": null,
"minZoom": 9,
"legend": null,
"conditions": null,
"id": "atmospheric-penetration"
}
示例响应
{
"id": "atmospheric-penetration",
"name": "Atmospheric penetration",
"description": "False color rendering with non-visible bands to reduce effects of atmospheric particles (B12, B11, B8A).",
"type": "raster-tile",
"options": "nodata=0&assets=B12&assets=B11&assets=B8A&color_formula=Gamma RGB 3.7 Saturation 1.5 Sigmoidal RGB 15 0.35",
"minZoom": 9
}
{
"id": "atmospheric-penetration",
"name": "Atmospheric penetration",
"description": "False color rendering with non-visible bands to reduce effects of atmospheric particles (B12, B11, B8A).",
"type": "raster-tile",
"options": "nodata=0&assets=B12&assets=B11&assets=B8A&color_formula=Gamma RGB 3.7 Saturation 1.5 Sigmoidal RGB 15 0.35",
"minZoom": 9
}
定义
| 名称 | 说明 |
|---|---|
|
Azure. |
错误对象。 |
|
Azure. |
包含错误详细信息的响应。 |
|
Azure. |
包含有关错误的更具体信息的对象。 根据 Azure REST API 准则 - https://aka.ms/AzureRestApiGuidelines#handling-errors。 |
|
Legend |
要创建的图例类型,以下之一: |
|
Render |
定义用于在地图上呈现数据的可视化参数。 |
|
Render |
定义启用渲染选项的条件。 |
|
Render |
用于生成数据图例的配置。 |
|
Render |
指定地图可视化的渲染选项类型。 |
|
Render |
定义矢量瓦片渲染的参数。 |
Azure.Core.Foundations.Error
错误对象。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
服务器定义的错误代码集之一。 |
| details |
导致此报告错误的特定错误的详细信息数组。 |
|
| innererror |
包含与当前对象有关错误的更具体信息的对象。 |
|
| message |
string |
有关错误的可读的表示形式。 |
| target |
string |
错误的目标。 |
Azure.Core.Foundations.ErrorResponse
包含错误详细信息的响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
Azure.Core.Foundations.InnerError
包含有关错误的更具体信息的对象。 根据 Azure REST API 准则 - https://aka.ms/AzureRestApiGuidelines#handling-errors。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
服务器定义的错误代码集之一。 |
| innererror |
内部错误。 |
LegendConfigType
要创建的图例类型,以下之一: continuous、 classmap或 intervalnone (注意, none 是字符串文本)。定义数据可视化的图例配置类型。
| 值 | 说明 |
|---|---|
| continuous |
连续色带图例。 |
| classmap |
具有类离散颜色的分类地图。 |
| interval |
具有离散范围的基于间隔的图例。 |
| none |
没有图例。 |
RenderOption
定义用于在地图上呈现数据的可视化参数。
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| conditions |
要启用此渲染选项,必须位于活动马赛克 CQL 中的属性/值条件列表 |
||
| description |
string |
对 render 选项的较长描述,可用于解释其内容。 |
|
| id |
string minLength: 1maxLength: 30 pattern: ^(?!\-|_)[a-zA-Z0-9_-]*(? |
render 选项的唯一标识符。 |
|
| legend |
此渲染选项的图例配置。 |
||
| minZoom |
integer (int32) maximum: 24 |
12 |
显示此图层的最小缩放级别。 |
| name |
string maxLength: 40 |
render 选项的简短描述性名称。 |
|
| options |
string |
TiTiler 渲染选项的 URL 查询字符串编码字符串。 仅对 |
|
| type | raster-tile |
要应用的渲染类型(栅格或矢量)。 |
|
| vectorOptions |
用于渲染矢量瓦片的选项。 仅对 |
RenderOptionCondition
定义启用渲染选项的条件。
| 名称 | 类型 | 说明 |
|---|---|---|
| property |
string |
要在活动 CQL 筛选器中签入的属性名称。 |
| value |
string |
属性必须相等的值。 |
RenderOptionLegend
用于生成数据图例的配置。
| 名称 | 类型 | 说明 |
|---|---|---|
| labels |
string[] |
要在图例上显示的文本标签。 |
| scaleFactor |
number (float) |
间隔图例标签乘以的系数。 对于色彩映射表定义映射到未缩放值的缩放栅格非常有用,可有效地将图例标签显示为缩放值。 |
| trimEnd |
integer (int32) |
要从图例末尾修剪的项目数。 |
| trimStart |
integer (int32) |
要从图例定义的开头开始修剪的项目数。 如果存在对渲染很重要的值(例如 nodata),而图例中不需要,则使用该值。 |
| type |
要创建的图例类型,以下之一: |
RenderOptionType
指定地图可视化的渲染选项类型。
| 值 | 说明 |
|---|---|
| raster-tile |
栅格瓦片渲染类型。 |
| vt-polygon |
矢量瓦片多边形渲染类型。 |
| vt-line |
矢量瓦片线渲染类型。 |
RenderOptionVectorOptions
定义矢量瓦片渲染的参数。
| 名称 | 类型 | 说明 |
|---|---|---|
| fillColor |
string |
面要素的填充颜色。 |
| filter |
string[] |
用于筛选特征的 MapBox GL 筛选表达式。 |
| sourceLayer |
string |
矢量图块中源层的名称。 |
| strokeColor |
string |
线条特征的描边颜色。 |
| strokeWidth |
integer (int32) |
线条描边的宽度(以像素为单位)。 |
| tilejsonKey |
string |
包含 TileJSON URL 的 Asset key。 |